Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd: improve header decoder #476

Merged
merged 1 commit into from Jan 25, 2022
Merged

zstd: improve header decoder #476

merged 1 commit into from Jan 25, 2022

Conversation

dsnet
Copy link
Contributor

@dsnet dsnet commented Jan 25, 2022

Changes made:

  • Add Header.HeaderSize to track the actual size of the header.
    The header is variable length, so providing this information allows
    the caller to do other low-level tasks, such as determining whether
    the entirety of a zstandard frame is a single segment block.
  • Add Header.Skippable{ID,Size} to make the Header type more
    useful for extracting data from metadata frames (see Expose skippable frames via the API. #459).
  • Re-arrange fields in Header to better match the order
    these appear in RFC 8478.

@dsnet dsnet marked this pull request as draft January 25, 2022 02:02
Changes made:
* Add Header.HeaderSize to track the actual size of the header.
The header is variable length, so providing this information allows
the caller to do other low-level tasks, such as determining whether
the entirety of a zstandard frame is a single segment block.
* Add Header.Skippable{ID,Size} to make the Header type more
useful for extracting data from metadata frames (see #459).
* Re-arrange fields in Header to better match the order
these appear in RFC 8478.
@dsnet dsnet marked this pull request as ready for review January 25, 2022 07:16
Copy link
Owner

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. LGTM

@klauspost klauspost merged commit 7f260be into klauspost:master Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants