bzak
bzak

Reputation: 495

Minimum File Size for Compression Algorithms

I know that for small files sometimes the compressed format can actually be larger than the initial file size.

Are the minimum file sizes known for popular compression libraries such as gzip and lz4?

I am dealing with files that are ~ 384 bytes.

Upvotes: 3

Views: 2549

Answers (1)

Mark Adler
Mark Adler

Reputation: 112642

This can be easily determined through experimentation. The smallest file that can be compressed by gzip is 24 bytes of zeros down to 23 bytes. The smallest lz4 can do is 31 bytes of zeros down to 30.

Upvotes: 3

Related Questions