Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NeoCL v1.1b has been released!
#1
NeoCL has been released!

A while ago, I needed to have several routines that were able to compress and decompress certain files. I looked everywhere on internet to find some QB routines that could do these things. The only thing I found was that the famous DirectQB library had some simple RLE routines. Since I considered this a major gap in the QB Community (no compression! Wink ) it was a great opportunity for myself to fill this gap, and I started making NeoCL. After being busy with it for almost a year in secret, here it is! By Neo, for the QB Community!

NeoCL stands for Neo Compression Library. Using this library, people can compress and decompress files for themselves. This could e.g. be used to pack all external files of a game or program in one package, with a compression ratio of about 20% - 80%. But it could also be used when files contain delicate data, as compression is also a good kind of encryption.

The NeoCL library has currently 7 algorithms built-in:
  • Run Length Encoding
  • Huffman
  • Flattening
  • Variable Bit Count
  • Sliding Window
  • Baconian
  • Lempel Ziv Welch

    Note that baconian is an original algorithm designed and coded by Neo and Scorp.
NOTES:
  • No AC because I'll have to invent BigDecimals for QB first Wink

The library comes with an amount of routines:
- To compress and decompress using each algorithm (so 7 compression routines and 7 decompression routines)
- To compress a file using a sequence
- To compress a file best
- And to decompress a file fully, i.e. undoing all recursive compressions applied to the file
So 17 routines for the user to enjoy! Wink

Now, I also included a program in the library, which is called N.N.S. v1.0. It is a file packer using NeoCL's routines that is able to pack multiple files in one archive, all with compression! This is ideal for packing all external files of your program or game in one archive, like many "real" games. The program NNS is in the "NNS" folder in the archive.
This program also comes with USERSUBS.BAS containing routines for the user to open and read the archive in QB.

NOTE: This library comes with one big example, which is N.N.S. itself. (It uses the NeoCL library to create compressed archives). To learn about routines, you can also refer to the N.N.S. source code in NNS.BAS. (It also uses the OverLoader Library, and the NeoLib v1.6b Library).

Anyway, just read the NEOCL.TXT document to learn all about NeoCL! I hope you'll like NeoCL!
I'd like to have as much feedback as possible! Wink

You can download NeoCL from: http://qbnz.com/harsoft/NeoCL.zip

Have fun!

P.S.: The algorithms can be optimized some more, but currently Scorp and I are inventing Adaptive Baconian.
P.S.2.: Anyone with a site, please add the package if you wish! Smile
P.S.3.: To try out the N.N.S. program, try packing your whole RelLib or CosmoX or DirectQB directory... Big Grin lol
P.S.4.: Please report any bugs Smile
P.S.5.: If you like to see my code, go ahead! It's in the source directory! Big Grin
Reply
#2
This fills in a hole in QB nicely Smile. Well done!
Reply
#3
Nice job, Neo. What kind of throughput does your lib produce? Can it (de)compress memory, or does it operate only on files? I'm looking forward to checking out your library.

I recently added compression to a c++ encryption project I've been working (off &) on. I call it Cypher_Z . I'm using zlib compression, which I understand to be LZW-type, but somehow avoiding royalty issues.

Anyway...congratulation on getting this substantial undertaking to release level.
Reply
#4
Quote:This fills in a hole in QB nicely . Well done!
Thanks! Big Grin

Quote:Nice job, Neo. What kind of throughput does your lib produce? Can it (de)compress memory, or does it operate only on files? I'm looking forward to checking out your library.
It currently only operates on files, but a workaround can be made easily. Maybe later I'll implement memory compression as well.

Quote:I recently added compression to a c++ encryption project I've been working (off &) on. I call it Cypher_Z . I'm using zlib compression, which I understand to be LZW-type, but somehow avoiding royalty issues.
Cool. I've checked out many resources about the LZW algorithm, but all of them wrote that LZW was copyrighted and you needed to pay in order to be "allowed" to use it. Anyway, if you're able to use something based on LZW without the royalty issues, perhaps you can say how you do it, so that I can implement it in NeoCL later on! Wink

Quote:Anyway...congratulation on getting this substantial undertaking to release level.
Yeah, after being busy with it for almost a year, I think it was time to finally finishing and releasing it Wink


Btw, this NeoCL library has bit compression! (BAC, HUF and VBC are bit compressions, the others are byte-compressions). It was quite some work do have QB to all that bitshifting and bit operations correctly! Wink Note that BAC, HUF and VBC are because of this (that QB doesn't have bit functions by origin), pretty slower than RLE, SW or FTT.

Anyone else? Big Grin
Reply
#5
LZW was patented by Unisys, but the patent expired worldwide on July 7, 2004. So you're free to use it. Big Grin
Reply
#6
GIFs ahoy, eh?
Reply
#7
Quote:LZW was patented by Unisys, but the patent expired worldwide on July 7, 2004. So you're free to use it. Big Grin
Big Grin That's great news! I wish I knew it before though... Wink Anyway, I'll now be able to just convert my C++ LZW code to QB and put it in the library, and that shouldn't take very long, so you'll hear from me quickly about the LZW adding! Tongue Thanks Plasma!

Btw Plasma, did you try the current version without the LZW?
Reply
#8
I took a look at it, haven't tried it out though because I don't have the time right now. Looks pretty solid though. Smile
Reply
#9
Thanks Smile

*Takes a look at this forum and my LZW code and wonders why Plasma is in stealth mode*

I also noticed that the QBNZ server was down overnight, but now the download works again. So... more people tried it? Wink
Reply
#10
Neo,

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.

it is open source c-code.

The authors claim that their library is in use in some pretty important applications/OS-utilities. Just FYI.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)