Integer Packer is a little tool used to store multiple small (positive) integers.
Warning: This project might not always work properly, but in case the packing code generated is wrong, you will be informed and told how to posssibly fix it.
Max Value it will reach
Bits occupied in total: 0
Select Language:
The generated functions have been tested, here are the results.
Input: INPUT
Packed: PACKED
Unpacked: UNPACKED
After packing and unpacking, SUCCESS out of TOTAL integers have correctly been recovered.
Sometimes fixing errors can easily be done. Try a few of the following things:
1. Make the numbers a bit smaller, if they are large.
2. Try changing the order of the numbers. This can solve the issue too.
3. Try making some very small numbers (~1-2) a little bit bigger. Often this works too.
4. Try reducing the amount of integers to be packed. With an amount of only 2, even large numbers work most of the time.
5. Try reducing the integer type from 64 bit to 32 bit. Often programming languages don't fully support 64 bit numbers to full precision.
If you think there is a issue with the generated code, and you know whats wrong, then please open an issue on the github repo, thanks.