Compression with real time compressed size estimation
Hi all. Is there a something I can use to compress a stream of data while getting a good estimate of the compressed size as I feed data into it? I doesn't have to be state of the art. I was thinking of maybe using something very simple like LZW but there aren't many good libraries or resources for it as it's not very popular nowadays.
1 Reply
I want to group small data messages (1-1000 bytes) into message batches while compressing messages within a batch, maximizing the number of messages in a batch but each batch has a hard size limit and I can't go over a single byte. I don't want to have to guess and start over many times.
I see BouncyCastle has a ZLib implementation that allow querying the total number of bytes so far. I think I'll use that.