Used zlib (level 6) #78
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue : #72
pics for reff :




I propose implementing zlib (level = 6) as default for our VCS. As it gives the most balanced performance
Performance Analysis ( on diff.c )
Raw size: 129,580 bytes
Comparing (these are compared to zlib level = 6)
Internal Mechanics: Why it Works
The chosen algorithm uses the DEFLATE method, combining two powerful techniques that allow it to handle both structured text and binary data effectively.
Process: The algorithm scans for repeated patterns. Instead of rewriting a sequence like for(int i=0; i < n; i++), it stores a "match" pointer (distance and length) to the previous occurrence.
Binary Benefit: Efficiently finds repeating color blocks in images or repeating structures in binary data.
Process: After pattern matching, it maps characters/sequences to variable-length bit-strings based on frequency. High-frequency data gets a very short code (e.g., 2 bits), while rare data gets a longer one.
Why it helps: This shrinks the file at a bitwise level, ensuring compression even when no obvious text patterns exist.