Skip to content

Commit

Permalink
Merge pull request #882 from ivanovanton/bugfix/zstd-frame-content-size
Browse files Browse the repository at this point in the history
Fix frame_content_size retrieval logic
  • Loading branch information
qkaiser authored Jun 24, 2024
2 parents f2a63d2 + b76d1b4 commit 5b0f16f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/integration/compression/zstd/__input__/large_fcs.zstd
Git LFS file not shown
Git LFS file not shown
2 changes: 1 addition & 1 deletion unblob/handlers/compression/zstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ZSTDHandler(Handler):
def get_frame_header_size(self, frame_header_descriptor: int) -> int:
single_segment = (frame_header_descriptor >> 5 & 1) & 0b1
dictionary_id = frame_header_descriptor >> 0 & 0b11
frame_content_size = (frame_header_descriptor >> 6) & 0b1
frame_content_size = (frame_header_descriptor >> 6) & 0b11
return (
int(not single_segment)
+ DICT_ID_FIELDSIZE_MAP[dictionary_id]
Expand Down

0 comments on commit 5b0f16f

Please sign in to comment.