Page 1 of 2
ReLEna - The Past Of File Archiving
Posted: Sun Feb 16, 2003 7:31 am
by Twilkitri
http://content.thegreatbeyond.net:8080/ ... relena.htm
Hey... I've actually got a program up!
Just something I thought I'd try, so I knocked it together in 2 or so days. I can't hope to compete with stuff like ZIP/RAR... so I've gone the other direction, back to RLE. Fun.
Might incorporate some of the later compressions into it later, though.
Only V1.0A at the moment, so if it doesn't work and decides to delete explorer.exe, don't come crying to me.
Tell me ways to make it better. You know you want to.
Posted: Wed Feb 19, 2003 6:23 am
by Twilkitri
I know that you were all just waiting for the next version before you replied.
And it's up! V1.1 of ReLEna is now available. With better compression than 1.0A and support for decoding old 1.0A encoded files (but you can't encode in 1.0A... why would you want to?).
Next... status boxes. *shudder* More GUI stuff... sigh...
Tell me what you think/want. You know you want to.
Oh, and I put a comparison up on the ReLEna page comparing it to WinZip. It's not very good... but ReLEna does have an advantage over WinZip. It's smaller. MUCH smaller. Not that WinZip's very big to begin with, but...
Posted: Wed Feb 19, 2003 4:47 pm
by Jo-chan
.....I hate to say it, DT, but I've never even heard of that kind of extension before. Therefore I really have no use for the program. o_o;; But from the screenshots you provided, it looks like you did a great job with it, so keep it up. ^_^
Posted: Wed Feb 19, 2003 5:37 pm
by Pez-Man
It looks like it works, but I have no idea what it does! And now I get a long, spread-out explanation!
Posted: Wed Feb 19, 2003 6:30 pm
by Twilkitri
Jo-chan wrote:.....I hate to say it, DT, but I've never even heard of that kind of extension before.
That would be because I created it to use with ReLEna. And when I say 'created', I mean 'stole from some old graphics type that no-one uses anymore, let alone has heard of'.
Pez-Man. You know what WinZip does right? Well that's basically what ReLEna does. Except it can only work with .rle files, and not .zip files.
Posted: Thu Feb 20, 2003 2:55 pm
by chromus
Alright, it looks like it's time for me to interject some science here.
Run-length encoding is a form of compression. Let's take an example from DT's website:
This is the string that you're trying to compress:
abbccceeeek esdfddd
Using run-length encoding, it can be shortened to this:
1a2b3c4e1k 1e1s1d1f3d
Neat, no?
Run-length encoding was one of the first kinds of compression to come about, and it seems to be very common sense, but there are many problems with it. When implemented incorrectly, a file full of random values actually becomes larger using run-length encoding than without, due to encoding the lengths of all the single character "runs", like so:
Original string:
abcdef
Compressed:
1a1b1c1d1e1f
Run-length encoding only works well for files where you get a lot of repeating values, like in monochrome bitmaps, where you only have black and white pixels.
When DT says he "made up the extension", all he really did was designate a three letter combination to work with his program. Funny enough, the extension ".rle" was originally used for pictures that were compressed using run-length encoding.
DT: You need to investigate a compression technique called a Huffman tree after you get ReLEna to work. It's a wonderful compression algorithm that works wonders. The greatest thing is, a library called ZLib implements free, open-source compression using both a Huffman tree and run-length encoding, so you can check out their source code to get some ideas.
Posted: Fri Feb 21, 2003 6:12 am
by Twilkitri
Well, I fixed ReLEna so that it doesn't need to include lengths of 1 anymore... usually. I've got the maximum run length specified atm to be 20, but I'm gonna muck around with that later and try and get better compression.
The lengths are stored in the final values of the byte (ie: 236-255 (or, in Java's case, -1 to -20. *shudder* you have no idea how long it took me to figure that out. In Java, a byte, instead of being 0-255, is -127 to 127.)) which means any values between 0 - 235 can be used as single values. If you have a single value between 236 - 255, you have to put 236 (1) first. So, the higher the max run length, the more single values which will need a 1 in front of them. I'm going to try a dynamic type where it scans the file for the longest run length and uses half of that for the maximum, eventually, and see how that works (or 128 if the max is over 256). A good thing about RLE - the decoder doesn't care what the maximum run length is, and'll work with anything.
I got a few compression books out of the Uni library, and I'm going to look at some of the stuff later. I'm aiming to get ReLena finished, then put an LZ77 (or something like it) over the top, and see how that works. *shudder* one of the books says that you should RLE by putting the character, then it's length, then a 'special character' to let the decoder know that that part was compressed :/
I think I'll find this sort of stuff easier if I can find some form of Bit I/O in Java. I don't _need_ it for anything (except the header, and I put together something for that... but it's too long...) but stuff'd be easier if I knew how to do Bit I/O.
Oh, and can people please d/l the thing and try to run it, even if you're not going to use it? Because I downloaded it at Uni, and
a) it made it a zip file, understandable since JARs are zip-compressed, but Windows shouldn't give it a zip extension like that.
b) it wouldn't run... I'd have loaded it up in BlueJ (crap Java compiler that the Uni uses) but I couldn't be bothered. I checked the manifest file and it was correct, so it should have run, but it didn't.
Anyway, I want to see if people have any problems getting it to run.
Posted: Fri Feb 21, 2003 1:26 pm
by Pez-Man
Isn't it great how Beyonder, Chromus, and DT might be the only people who actually understand what the crap they're talking about here?
Posted: Fri Feb 21, 2003 10:48 pm
by Jo-chan
Here, here. o_o
Posted: Sat Feb 22, 2003 9:42 am
by Pez-Man
Where, where?
Posted: Sat Feb 22, 2003 2:02 pm
by beyonder
There, there.
Posted: Sat Feb 22, 2003 3:02 pm
by chromus
Don't bother with LZ77 compression. It's the type of compression used in ZIP files and it's covered by a patent, so you can get sued for using it. Check out ZLib compression.
Posted: Sun Feb 23, 2003 8:32 pm
by Twilkitri
Wasn't it LZ78/LZW which was patented? I know that LZW is patented by UniSys... I didn't think that LZ77 was patented...
Posted: Sun Feb 23, 2003 10:51 pm
by chromus
Sorry, acronym confustion there. DT, you're right, LZW is the method of compression patented by Unisys, and LZ77 is the method of compression that I was talking about in the first place.
Second error, LZW is not the compression scheme used in ZIP files, but GIF files. ZIP files use a variant of LZ77.
Posted: Mon Feb 24, 2003 4:19 pm
by Jo-chan
Isn't there also a .LHA extension? All those Kisake dolls use that extension, I think.