5 ms·
So I tried it and it's 72135 bytes using tar czf (created by `fs.writeFileSync('/tmp/file',new Buffer(74207281).fill("1"),'utf8')`) Not that it's the most effi
by rom1504 11y ago
So I tried it and it's 72135 bytes using tar czf (created by `fs.writeFileSync('/tmp/file',new Buffer(74207281).fill("1"),'utf8')`)
Not that it's the most efficient representation at all, 74207281 fits in 4 bytes.
- daveguy 11y agoM49 (for the 49th mersenne prime) fits in 2 bytes! Or even better just 49! 6 bits! Assuming your decompression algorithm is optimized for mersenne primes. :)
- alasdair_ 11y agoIt can fit in a single bit if your algorithm is optimized for "primes that are equal to M49" :)
- graylights 11y agoGreat, I've just discovered the 50th mersenne prime, M50. Decompression takes a lot of time.
- dchest 11y agoThis thread is officially dumb. One guy miscalculates 75 Mbit as ~75 MiB, another guy fills ~70 MiB file with ASCII "1"s.
- banku_brougham 11y agodumb, but fun
- yitchelle 11y agoStrange but very useful things could emerge from just mucking about and poking around...
- dchest 11y agoHehe, I didn't mean to sound negative! Agree with the other poster that it's quite fun. Oh, and I also forgot to mention that the guy used `tar` for compressing one file. I'll see myself out.
- coldpie 11y agoI'm glad I started this stupid thread, and this is my favorite comment in it.