MiloszKrajewski / K4os.Compression.LZ4

LZ4/LH4HC compression for .NET Standard 1.6/2.0 (formerly known as lz4net)
MIT License
675 stars 77 forks source link

h264 nal unit invalid #100

Closed xlievo closed 3 months ago

xlievo commented 3 months ago

Out of curiosity, I compressed the h264 lossy encoding unit, and the result was a small increase in the number of bytes, at all LZ4Level. Does it not apply to recompression of h264 frames?

LZ4Codec.Encode...
MiloszKrajewski commented 3 months ago

Not sure if I understand your question about "Does it not apply to recompression of h264 frames?", but I think I can explain the "small increase in the number of bytes":

H.264 is already highly compressed. Your hopes that you could compress already highly compressed data further is a little bit misplaced. In such case you would be able to compress already compressed data ad infinitum until it reaches 0 bytes.

xlievo commented 3 months ago

Thank you for your answer, just as I suspected!