You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.
Would you accept a PR to add a function lz4.DecodeLength(dst, src []byte, length int) ([]byte, error)? This function would operate on data that doesn't have the four byte preamble.
The reasoning is that it's easy to get the desired format from Encode() when you don't want the length preamble - just chop off the first four bytes of the returned buffer. The other direction is more annoying if you happen to already have a buffer with data without length preamble - at minimum it requires constructing a new buffer with the length at front and copying the compressed data.
By extracting the decode function for a known length, the existing Decode() can trivially delegate to this new function after extracting the length from the head of the buffer.
(The existing format is also unuseful to us because the length is encoded in little endian byte order rather than network byte order...)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'd like to see LZ4 framing supported.
The frame-descriptor includes an optional content-length, which may help to eliminate go-lz4's unique means of storing such:
The text was updated successfully, but these errors were encountered: