λ
home posts study uses projects

Prefix Property

Jul 18, 2024

compression

The prefix property allows you to encode different symbols of data with variable-length without using any special markers in between. Any encoding algorithm that can represent different symbols without using common prefixes follows this property. Fixed-length codes inherently abide by this property.

Example

An example of an encoding that doesn’t have the prefix property is this: Drawing 2023-11-04 17.58.35.excalidraw You can see that there is ambiguity when decoding - the encoding for A prefixes the encoding for B. An example of an encoding that does have the prefix property is this: Drawing 2023-11-04 18.10.54.excalidraw There is no ambiguity when decoding

References

LλBS

All systems up and running

Commit c0daef5, deployed on Oct 01, 2024.