Open rmja opened 2 years ago
I love it. You share nearly all the code between the two modes, and it seems to be truly streaming. Wonderful job, IMO. Thank you.
I left you a present. Happy to talk about it.
@MiloszKrajewski We now have a reasonably good proposal for a pipe streaming based encoder and decoder, and we now need your inputs to proceed from here. Let us know what you think ! cc @AArnott
I am not ignoring you, believe me. I just have my own branch with similar goal (see: abstracted-streams
) and I need to wrap my head around it.
This PR has a lot of good code and feel bad about not using it.
At the same time, it no longer applies in a sense, and baseline already has this functionality.
So I decided to keep it a pipelines-prototype
and look at this later, while deleting the PR because it won't be merged in this form probably ever.
This is a working initial prototype of
LZ4FrameEncoder
andLZ4FrameDecoder
that works usingPipeReader
andPipeWriter
. It is put in a separateK4os.Compression.LZ4.Buffers
project as I do not have the correct csproj skillset to get this working inK4os.Compression.LZ4.Streams
because of the very old target frameworks. This currently targets .NET 6 - it probably needs to be relaxed, but I need help to accomplish this.If the target frameworks can be the same as
K4os.Compression.LZ4.Streams
then I see three proposals:K4os.Compression.LZ4.Streams
and use it as the fundamentals for the currently exported stream classes.K4os.Compression.LZ4.Streams
to accomplish the same task as 1.K4os.Compression.LZ4.Streams
and have the two different implementations.This implementation supports almost all features in a LZ4 frame, including ContentSize, block and content checksums, etc. except the dictionary field.
Feel free to make any comments and commit to this pr.
This pr replaces the previous gist https://gist.github.com/rmja/98dc7e0576c933faa0a75629b46af71c.
This pr fixes #14.
cc @MiloszKrajewski @aarnott