(May-23-2017, 05:49 AM)Ofnuts Wrote: If it's binary, don' t put it in a string. Use a byte array.
that's really what i mean. it's still written like a string. what i am wondering is if ints could be a more efficient way to express it. my goal is to make the file that looks like python source code as small as possible.
data = b'\000\377\377\000\000\377\377\003\000\177\177\005\006\377\377\001'vs.
data = ( 72056494543077123, 35886981611257601 )vs.
data = 1329207713684792564064364514848538369it looks like int would be more efficient.
(Jun-01-2017, 09:51 PM)nilamo Wrote: Base64 is how binary images are stored in source fairly frequently. Not sure if that helps you or not.that is one of the first ways i looked at. but it is rather inefficient. it's better than hexadecimal, but only by 50% more. in terms of the convenience of available tools for conversion, it is a good choice. but look at how you would embed it in source code. you would have a big string of the base64 characters and the calls to convert that string. that would take up a lot of source code space.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.