![]() We know can then recreate the original by replacing every 1 with the data between the bar ( | ) and the equals ( = ) before the first 1, and replacing every 2 with the data between the bar and equals before the first 2.Ĭreating the identifiers may use some extra space itself (2 characters in this case) but can save characters every time that sequence comes up again (3 in the case of AAAA, 1 in the case of BC). Whenever these sequences show up again we replace them with their identifier. We then have 3 letters DDC where the sequence is unique, and then BC are the next two letters that repeat multiple times so we also assign those two letters a name, "2". We know that that sequence shows up in multiple places so we assign that a name, "1". Notice how the second sequence is shorter by 4 characters but contains all of the data to identically recreate the first sequence? Take for example this arbitrary group of letters: No data is "lost" when you use zip compression (aka deflate). a zip file compresses arbitrary data and can recreate that data in a bit perfect way. That's again not how lossless compression happens. Originally posted by Heathen: lossless compression is bit-perfect. I'm only arguing that compression inherently involves removing bits from the original data for more compact storage, and decompression involves the computation of decoding to "restore the original bits", which is why for games like Carrion playback of compressed audio includes a slight performance overhead. If that didn't come at some performance cost, we wouldn't be arguing about options like whether to decompress audio on load like in Carrion. ![]() I'm not an audio guy, there are clearly clever ways to preserve that such as FLAC linked above, but it's still compression that involves throwing out "less useful" data (I have no idea how FLAC works, but the simplest example I'm familiar with is say encoding 0's and 1's that have contiguous 0's and 1's, like 01111110, to remove repetitions - this is probably a nonsense example to how an actual audio compression algorithm works, though, in terms of being designed by people who actually know how digital audio works). What matters is the encoding and compression still enabling accurate reproduction of the original waveform in terms of things like sample rate and bit depth. ![]() I think what you're trying to say is "the bits that count for the audio are all still there after the decompression". wav) would be the same bits (1,024 bits). If the compressed data were bit-perfect, it wouldn't be compression, because the data (say 1mB, literally 1,024 bits, of raw.
0 Comments
Leave a Reply. |