This content contains rapidly flashing or strobing images that may trigger seizures in people with photosensitive epilepsy.
Viewer discretion is advised.
Binary encoding and decoding calculator using BigInt for arbitrary precision
📄 Read the COmpREss Documentation
Process: The compression algorithm encodes each bit of the input number starting from the most significant bit.
Starting Value: Begin with 4
For each bit (from MSB to LSB):
Final Step: Subtract 4 from the result
Example: Input = 100 (binary: 1100100)
Start: 4 → bit 1: (4×2)-3=5 → bit 1: (5×2)-3=7 → bit 0: (7×2)-2=12 → bit 0: (12×2)-2=22 → bit 1: (22×2)-3=41 → bit 0: (41×2)-2=80 → bit 0: (80×2)-2=158
Final: 158 - 4 = 154
Formula: Alternate Output = Output + 2(number_of_input_bits - 1)
Explanation: The alternate output adds a power of two offset to the regular compression output. This offset is calculated based on the bit length of the input number (before compression).
Example: If input = 100 (7 bits: 1100100), and output = 154, then:
Alternate = 154 + 2(7-1) = 154 + 26 = 154 + 64 = 218
Purpose: Provides an alternative encoding that can be used for compression control sequences, allowing you to choose between two valid encodings for the same input.
Binary will be collected here as you decompress...
Binary representation will appear here...
Results will appear here...
Alternate results will appear here...