Hacker News new | ask | show | jobs
by rom1504 3810 days 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.

2 comments

This thread is officially dumb. One guy miscalculates 75 Mbit as ~75 MiB, another guy fills ~70 MiB file with ASCII "1"s.
Strange but very useful things could emerge from just mucking about and poking around...
Hehe, 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.

I'm glad I started this stupid thread, and this is my favorite comment in it.
dumb, but fun
M49 (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. :)
It can fit in a single bit if your algorithm is optimized for "primes that are equal to M49" :)
You could optimize the single bit away by assuming that there would be a bit.
Great, I've just discovered the 50th mersenne prime, M50. Decompression takes a lot of time.