The (until now) impossibly perfect lossless compression utility!
- What is JoeZip?
- I take it the tagline didn't clue you in, then. JoeZip is a file
compression utility. It is unique in that it is designed to be used
repeatedly on its own compressed files, which will keep getting smaller as
JoeZip is invoked. The files are fully recoverable, with no loss of data!
Just decompress any file as many times as you compressed it, and it will all
be there, intact!
- Isn't that theoretically impossible?
- This has always been thought to be the case. "Surely," reasoned the
cynics1, "a perfect compression utility
would, if run enough times upon the same file, compress it to zero bytes, at
which point all of its data would be lost. There would be no way to restore
multiple unique files from a file of length zero." JoeZip proves them all
wrong. It can and does restore files perfectly, even from
- How does it work?
- The algorithm is shockingly simple. Imagine that all possible files are
put in order, starting counting at 0, because that's what computer science
people do. I'll depict byte values as paired hexadecimal digits, as seen in
The zero-byte file is file number 0. File number 1 consists of one byte, of
value 00. File 2 is just the byte 01. File 3 is one byte: 02. Keep going
through the 256th file, containing the value FF. The 257th file is two
bytes: 00 00. Then 01 00. Then 02 00. Incrementing the
file FF FF brings us to the 65793rd file: 00 00 00. And so
What JoeZip does is to change a file into the next one in order: Down if
it's "compressing" the file, and up if it's "decompressing" the file. So if
you start with the 75000th file (F7 23 00) and "compress" it once,
you get the 74999th file (F6 23 00). "Compress" it 74999 more
times, and you get the 0th file; it's fully compressed. To recover your
file, you have to remember that you compressed it 75000 times, and
decompress it the same number of times, in order to cycle through all the
possible files until it gets to the the 75000th file, your original.
- If I run JoeZip until my file is zero bytes, where is the
- That's the beauty of it. It's not taking up any space on your hard drive
or other media. Rather, it is fully encoded into the number of times that
you have compressed your file. This number exists only in your memory. You
can write it down, if you don't trust yourself to remember it, or just make
a little tick mark for every time you compress your file.
- How long will it take?
- Since JoeZip adheres to a strict ordering system, the number of
necessary iterations of the program is easily calculable. Assuming that you
want to compress your file as much as possible (who wouldn't?), the number
of steps equals the base-256 number represented by your file (backward - the
first byte is the units byte), since it counts from that down to zero first,
plus the number of possible files smaller than your file, since it passes
through all of those on the way down. The latter number equals the
summation of 256n, where n goes from zero (representing the
zero-byte file) to one less than the length (in bytes) of your file
(representing all possible files one byte shorter than yours).
Conveniently, this summation, when written in base 256, is just a series of
ones as long as your file. What this means is that you can add one to every
byte in your file, carrying to the right when you have to, and presto!
You'll know in advance both the number of times you'll have to compress your
file to get it down to zero bytes, and the number of times you'll have to
decompress the zero-byte file to get your original file back.
For example, let's say that you're an accountant, and wish to compress a
file containing the text "$32.54" followed by a carriage-return
and line-feed. The ASCII values of your file look like this:
36 51 50 46 53 52 13 10 in decimal, or:
24 33 32 2E 35 34 0D 0A in hexadecimal.
To see how many times you'll need to compress your file, we first add one to
37 52 51 57 52 53 14 11 in decimal, or:
25 34 33 2F 36 35 0E 0B in hexadecimal.
Then we treat each byte as a digit in a backward base-256 number, convert to
base ten, and get our final result:
"Out of range." Um, give me a moment here...
Somewhat over seven hundred ninety-six quadrillion runs of JoeZip are
necessary in this case. (That's "seven hundred ninety-six thousand
billion" for non-Americans.) In particular, the number is
796,632,682,505,384,997. You must remember it exactly, or you won't be able
to get your file back. If your fingers get tired, or you get hungry, you
may want to write a batch file or Perl script to automate the process.
- Is JoeZip difficult to use?
- One might argue that counting to and remembering the number
796,632,682,505,384,997 is harder than just memorizing "$32.54" and deleting
the file. But hey, that's the user's problem. Not mine.
- How much does it cost?
- JoeZip is absolutely free!
- What platforms does JoeZip support?
- Currently, JoeZip is only known to run under MS-DOS 5.0 or higher, and
Micro$oft Windows 9x. Those of you who instead run a cool, non-M$ OS can
thank me now.
- Where can I get JoeZip?
- You can download JoeZip.exe at the top of this
page, or from its link within this very sentence! (But you really shouldn't
be downloading and running any strange executables unless you have reason to
trust the site in question. You can trust my site, of course. Everybody
can trust my site.)
- What other great software can I expect from
- Look for JoeCrypt, the cryptography program that stores your encrypted
file inside its own password, coming soon!
1. My friend Marty, actually.
Entrance | Yindex
| © 1999-2008