« first day (3747 days earlier)      last day (1204 days later) » 

1:34 PM
@NordineLotfi I think you're clear enough grammatically. Unfortunately, your last remark is indeed the case; you are trivially wrong because the 8-to-1 packing is already optimal so obviously nothing can do better than it. At this point I think the best for you is to simply learn the (simple) mathematics needed to prove it to yourself.
If your input has n characters, there are 2^n possible combinations of positions that you may wish to encode. So trivially you need to use an encoding that has 2^n possible combinations, and thus no encoding can use less than n bits = n/8 bytes. Since the 8-to-1 packing that I stated achieves that, it is optimal.
And there is no need for experiments. The whole point about mathematics is that we can figure out truths for sure, whereas experiments can only give you uncertain intuition.
 
 
4 hours later…
5:35 PM
@user21820 um, i did said "i might be wrong in stating that it could give me better space saving than the method i mentioned/you corrected me on, but I just like to experiment for myself even if I end up wrong"
just wanted you to help me understand this encoding, whether it had anything to do or not with what i wanted to do...
guess I'll know it by myself then, thanks for everything :)
 
@NordineLotfi Since you said "might be wrong", that's why I corrected you by telling you "definitely wrong". I don't waste people's time, so I don't help people to learn something that I already know is a waste of time. You're of course free to waste your own time, but as I said you're better off first learning the trivial mathematics and programming the optimal solution before you even bother with other things.
In any case, hope you eventually figure things out!
 

« first day (3747 days earlier)      last day (1204 days later) »