Skip to content

High-level description of S2's compression process? #733

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

You must be logged in to vote

Do you have any high-level documentation on how S2 compresses data?

Compression formats are defined by their decompression algorithm. S2 is defined by the Snappy format (blocks/frames) with 3 minor changes.

You can an implementation in the Go decoder.

I believe this file is hand-written rather than generated based on the commits being made to it but there aren't any annotations.

The assembler is generated from pseudo-assembler using avo.

S2 is said to detect and skip over data that isn't compressible and the way this is described makes me believe Snappy never had this sort of capability but when I examined Google's Snappy C code I can see there is heuristic match skipping support in …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@marklit
Comment options

@klauspost
Comment options

Answer selected by klauspost
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
Converted from issue

This discussion was converted from issue #731 on January 07, 2023 11:07.