Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NeoCL v1.1b has been released!
#11
Good work!
Quote: It was quite some work do have QB to all that bitshifting and bit operations correctly! Wink
So you noticed it! I had the same problem doing the Huffman part of my Jpeg viewer.

BTW: There are some old (1995!) huffman and LZW QB sources at ABC, by Rich Geldreich, I think.
Antoni
Reply
#12
Cool, was thinking about writing a compression library myslef.
Guess you beat me to it :)
Anyways, I'll check it out tonight, let you know what I think later.

Cya.
Reply
#13
Quote:*Takes a look at this forum and my LZW code and wonders why Plasma is in stealth mode*

*wonders wtf steath mode is* [Image: shiftyeyes.gif]
Reply
#14
Test results for compressed file size:
Code:
Results with Canterbury Corpus (a standard pack of samples for testing compressors)
http://corpus.canterbury.ac.nz/descriptions/#cantrbry
Uncompressed size     2816188 bytes  

NNS weakest           2391654 bytes 85%   it choose RLE    
NNS Normal            1809722 bytes 64%   it choose RLE-BAC-RLE mainly
NNS Strongest         1599498 bytes 57%   choose a different combination for each file!!
  
.tar.gz                739071 bytes 26%   I downloaded the samples in this format..
winzip 7.0 strongest   732163 bytes 26%    
bzip2  1.0.1           542722 bytes 19%     http://www.digistar.com/bzip2/
rar    3.0 strongest   419750 bytes 15%  

Both winzip and bzip would rate better if they were able to create an archive file
and then compress it as it does winrar.
Antoni
Reply
#15
Quote:
Neo Wrote:*Takes a look at this forum and my LZW code and wonders why Plasma is in stealth mode*

*wonders wtf steath mode is* [Image: shiftyeyes.gif]

I believe he means invisble mode because you are hidden just like Nathan.
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply
#16
NeoCL v1.1 has been uploaded!
Now available from http://qbnz.com/harsoft/NeoCL.zip and http://qbnz.com/harsoft/NeoCL11.zip.

New features: LZW
Other features: fixed some lurking severe bugs (in the bit compressions... Wink)

Compression ratios decreased with LZW! Big Grin (especially on text-based files)

Please anyone, try this one out! Wink


Quote:I misrepresented...

zlib is available from:
http://www.gzip.org/zlib/
and does *not* use LZW.

It is the same alg used in the PNG format, and in PKZIP.
Cool. I'll take a look at it at maybe I'll implement it later on as well, if it's that good Wink Also, please re-run the test with NeoCL v1.1, with LZW.

Quote:So you noticed it! I had the same problem doing the Huffman part of my Jpeg viewer.

BTW: There are some old (1995!) huffman and LZW QB sources at ABC, by Rich Geldreich, I think.
Thanks! Also, I didn't have problems with my Huffman, but mainly with converting the C++ BAC and VBC to QB Smile It worked out eventually Smile
I'll try to find the ABC packets with LZW and HUF... Smile

Quote:*wonders wtf steath mode is*
Your online status is hidden Smile

Quote:Test results for compressed file size
Cool package of things! I'll use it as well to check out. Anyway, please re-run the test with the NeoCL v1.1 version, with LZW. I'd like to see the results with LZW in it Wink
Reply
#17
Neo:
I'll test the LZW tonight.

You could check bzip2, it gives very good results and it comes with source code. It uses a Burrows-Wheeler transform + Huffman. As you have already coded Huffman, BW does'nt seem too complicated. And yo u can see the results in my table.

When you have all that running ok, we should try to optimize it. I run the tests while doing other things, o I don't care, but for a real use it's all a little slow...
Antoni
Reply
#18
Quote:I'll test the LZW tonight.
ok

Quote:You could check bzip2, it gives very good results and it comes with source code. It uses a Burrows-Wheeler transform + Huffman. As you have already coded Huffman, BW does'nt seem too complicated. And yo u can see the results in my table.
I'll look it up. I took a look at Mango's compression as well, but it is quite large, it will take ages to convert to Pure QB...

Quote:When you have all that running ok, we should try to optimize it. I run the tests while doing other things, o I don't care, but for a real use it's all a little slow...
I know, it's Pure QB Wink
Reply
#19
Quote:Also, please re-run the test with NeoCL v1.1, with LZW.

So...does that mean you got my e-mail?

I'll Test the LZW-including code as soon as I send this.

I'm impressed Neo. You take a year working on your 5 or 6 algs, then add LZW to your prog in :o 1-DAY :o You 'da man! (or...one of 'da men :wink: ...don't want to insult Rel, plasma, nat, et-al)
Reply
#20
Quote:So...does that mean you got my e-mail?
Yes, I got the mail Wink Thanks for the compliment about N.N.S.! Wink Btw, EXEs are usually best compressed with FTT->VBC or similar Wink

Quote:I'll Test the LZW-including code as soon as I send this.
Ok. I might be able to catch the mail before I'm going offline again soon... Smile

Quote:I'm impressed Neo. You take a year working on your 5 or 6 algs, then add LZW to your prog in :o 1-DAY :o You 'da man! (or...one of 'da men :wink: ...don't want to insult Rel, plasma, nat, et-al)
Thanks for the compliment! :roll:
But I have to tell you:
I didn't code those five algorithms in one year. I researched for almost a year, together with Scorp. Then, when we had enough information to do something, we coded the algorithms, in about 2 weeks. This was quite easy in C++ (with classes etc). Now, I only have to convert the C++ code of those algorithms we made a while back to QB, although this usually is harder than it seems (especially when converting pointer-algorithms).
Yesterday, I converted (or tried to convert) LZW. I thought it was ok after some test runs, packaged everything and put it on floppy. Then I found a bug and an "Overflow Error" and "String space corrupt errors". Been filtering those out till about midnight. The cause was a faulty conversion from pointers to QB. Then I ran some tests again and came to the conclusion that the decompressed files are some bytes larger than uncompressed files, although the contents are exactly the same! :-? I tried to solve this problem, and I finally saw I missed a "=" (is-equal-to sign) somewhere in the algorithm. It was 01.00 AM then (note: I started at 18.00 PM the previous day). So... I hope it works now and that I didn't forget some more stuff, although tests show that it seems to be working fine now.

Anyway, I was quite tired afterward (but with a good feeling of having achieved something Smile). If you want to see what I was talking about, take a look at the code in LZW.BAS Smile

The GZip code you were talking about, I took a look at it, and came to the conclusion that it'll cost me ages to convert to QB... (I'm on uni so I don't have much time every day). Maybe for now, these 7 compression algorithms, when their powers are combined, provide enough compression for QB people Wink
I mean, it wasn't my goal to beat WinZip or WinRAR or so (although I sometimes did beat them with many many bytes), just to provide some cool routines for other QBers, so that they can control compression in their programs themselves, together with an acceptable compression (usually around 50%, twice as big as zip).

For now, my future goal is implementing Arithmetic (En)Coding using a BigDecimal library for QB I still have to invent (aw Oracle, why didn't you finish StatLib? Wink)

I hope you understand

Also, anyone? comments or test results? Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)