From dad441a6b84e58a91da23c81c8c944fd2b0f16aa Mon Sep 17 00:00:00 2001 From: Martin Lindhe Date: Thu, 11 Jan 2024 20:18:31 +0100 Subject: [PATCH] templates: improve zstd --- templates/archives/zstd.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/archives/zstd.yml b/templates/archives/zstd.yml index 2a3dbdd..355f66c 100644 --- a/templates/archives/zstd.yml +++ b/templates/archives/zstd.yml @@ -1,6 +1,7 @@ # STATUS: 70% # TODO access value of Block_Size, auto bit shifted +# TODO add support for xxh64 hash # TODO need more samples references: @@ -8,7 +9,7 @@ references: kind: archive name: ZStd compressed data stream -extensions: [.zstd] +extensions: [.zst, .zstd] endian: little magic: @@ -47,6 +48,8 @@ structs: if (self.Frame_Header_Descriptor & Single_Segment_flag) == 0: u8 Window_Descriptor: ?? + else: + u8 Frame_Content_Size: ?? # XXX can be 1,2,4 or 8 bytes long, need samples # Dictionary_ID 0-4 bytes if (self.Frame_Header_Descriptor & Dictionary_ID_flag) == 1: @@ -73,7 +76,7 @@ structs: # N bytes of Block_Content if (self.Block_Header & Last_Block) == 1: if (Frame.Frame_Header_Descriptor & Content_Checksum_flag) != 0: - u32 ContentChecksum: ?? + u32 ContentChecksum: ?? # XXX xxh64 hash parse: stop layout: