Yes because you have to have some metadata that describes how to decompress the compressed data. This is the case in all compression algorithms I know.
As an example Lz4 and zstd also have a compressBound() function that calculates this.
I'm pretty sure it's the case in all compression algorithms, period — if you make some inputs smaller, you have to make other inputs larger. There's a pigeonhole style argument for it. The trick of course is to make the inputs you expect to actually encounter smaller, ideally while enlarging other inputs as little as possible.
4 comments
[ 366 ms ] story [ 639 ms ] threadAs an example Lz4 and zstd also have a compressBound() function that calculates this.
What integer patterns does it do well on, and what patterns does it do poorly on?
How many strategies does it support? It only mentions delta which is not compression. Huffman, RLE, variable-length encoding ...
Does it really just "give up" at C/1024 compression if your input is a gigabyte of zeros?