Skip to content

Is there an option to reduce header size? #907

Answered by klauspost
teikjun asked this question in Q&A
Discussion options

You must be logged in to vote

I don't want to add a dedicated "block" interface, since that will just add confusion about which is which.

A reasonable approach would be to strip the frame header and re-add it. I can add that to the Header parsing that already exists.

// DecodeAndStrip will decode the header from the beginning of the stream
// and on success return the remaining bytes.
// This will decode the frame header and the first block header if enough bytes are provided.
// It is recommended to provide at least HeaderMaxSize bytes.
// If the frame header cannot be read an error will be returned.
// If there isn't enough input, io.ErrUnexpectedEOF is returned.
// The FirstBlock.OK will indicate if enough informat…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@klauspost
Comment options

@klauspost
Comment options

@teikjun
Comment options

@klauspost
Comment options

@klauspost
Comment options

Answer selected by teikjun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants