Qbasicnews.com
July 18, 2019, 09:26:19 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: zip in qbasic  (Read 5502 times)
Karelius
Member
*
Posts: 88



« on: August 31, 2006, 11:28:46 AM »

is it possible to compress files in zip with qbasic?
Logged
Torahteen
Ancient Guru
****
Posts: 744



« Reply #1 on: August 31, 2006, 04:46:49 PM »

Well... yes. You need to read up on the format and algorithm used in a zip file however. Good luck Wink
Logged

quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Skyler
Ancient Guru
****
Posts: 564



« Reply #2 on: September 05, 2006, 11:22:39 AM »

But you don't necessarily have to use the zip format. You could use other compression algos, or even develop your own.
Logged

In the beginning, there is darkness the emptiness of a matrix waiting for the light. Then a single photon flares into existence. Then another. Soon, thousands more. Optronic pathways connect, subroutines emerge from the chaos, and a holographic consciousness is born." -The Doctor
Zap
Been there, done that
*****
Posts: 1124


« Reply #3 on: September 05, 2006, 11:36:34 AM »

Neo did a library full of compression routines, look into that.
Logged

url=http://www.copy-pasta.com]CopyPasta[/url] - FilePasta
Moneo
Na_th_an
*****
Posts: 1971


« Reply #4 on: September 27, 2006, 11:28:05 PM »

Why reinvent the wheel?
The best compression around is in PKZIP. Even WinZip uses the same algorithm.

Need to compress one or more files, just do a SHELL to PKZIP from your program, or PKUNZIP to decompress them.

Besides, it's not only the compression. There's also the CRC generated on each file, the decompresssion, and many other considerations.

Unless maybe you're just playing around.........

*****
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #5 on: September 28, 2006, 05:35:59 AM »

A compression/decompression set of routines is very useful so you can compress/decompress from your program without having to call anything external. Makes your application more robust Smiley

You can use ZZLib in freeBASIC, which compress quite well and is pretty straightforward to use (basicly you read uncompressed data from a "virtual file" - the library opens the compressed file, decompresses the data on the fly, and provides you with that uncompressed data).
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Moneo
Na_th_an
*****
Posts: 1971


« Reply #6 on: September 30, 2006, 09:34:13 PM »

Quote from: "na_th_an"
A compression/decompression set of routines is very useful so you can compress/decompress from your program without having to call anything external. Makes your application more robust Smiley

You can use ZZLib in freeBASIC, which compress quite well and is pretty straightforward to use (basicly you read uncompressed data from a "virtual file" - the library opens the compressed file, decompresses the data on the fly, and provides you with that uncompressed data).

I get your point, amigo, but I disagree in general. I've developed some pretty robust applications that handled millions of dollars, and I've used external software, such as, Btrieve, Opt-Tech Sort, Pkzip/Pkunzip, the LIST utility, and several Norton Utilities. I think using industry-standard, documented software in your application enhances it and therefore makes it more reliable.

Maybe in a few years the ZZlib of Freebasic will become an industry standard, but it's not there yet.

Saludos..... Moneo
Logged
Anonymous
Guest
« Reply #7 on: October 01, 2006, 02:43:21 AM »

ZZLIB? perhaps you're thinking of zLib? and by all means, thats about as much as a standard as you're going to get. ever heard of php? it has zLib routines built in? doesn't it =p not to mention linux is HIGHLY dependent on it, as are Many other system.
Logged
Moneo
Na_th_an
*****
Posts: 1971


« Reply #8 on: October 01, 2006, 10:06:35 PM »

Ok if you say so.

*****
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #9 on: October 05, 2006, 05:20:15 AM »

Quote from: "Moneo"
Quote from: "na_th_an"
A compression/decompression set of routines is very useful so you can compress/decompress from your program without having to call anything external. Makes your application more robust Smiley

You can use ZZLib in freeBASIC, which compress quite well and is pretty straightforward to use (basicly you read uncompressed data from a "virtual file" - the library opens the compressed file, decompresses the data on the fly, and provides you with that uncompressed data).

I get your point, amigo, but I disagree in general. I've developed some pretty robust applications that handled millions of dollars, and I've used external software, such as, Btrieve, Opt-Tech Sort, Pkzip/Pkunzip, the LIST utility, and several Norton Utilities. I think using industry-standard, documented software in your application enhances it and therefore makes it more reliable.

Maybe in a few years the ZZlib of Freebasic will become an industry standard, but it's not there yet.

Saludos..... Moneo


The moment where you have to rely on the Operating System to do a shell to call another program, then going back to the caller one is a weak point, talking about security. Anybody could change the ZIP.EXE program (or whatever it is called) for another thing called just the same and voie la.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Anonymous
Guest
« Reply #10 on: October 05, 2006, 01:14:42 PM »

Quote from: "Moneo"
Ok if you say so.

*****


not only me =)


Quote from: "google"
Results 1 - 10 of about 1,510,000 for pkzip.
Results 1 - 10 of about 10,200,000 for zlib.
Logged
Moneo
Na_th_an
*****
Posts: 1971


« Reply #11 on: October 05, 2006, 10:24:01 PM »

Quote from: "cha0s"
Quote from: "Moneo"
Ok if you say so.

*****


not only me =)


Quote from: "google"
Results 1 - 10 of about 1,510,000 for pkzip.
Results 1 - 10 of about 10,200,000 for zlib.


Using the same yardstick..... 22,200,000 for winzip, son of pkzip. Cheesy

*****
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #12 on: October 06, 2006, 03:34:08 AM »

Insert here what I said before. Risky and unsecure. Someone could do really nasty stuff just replacing a file.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Anonymous
Guest
« Reply #13 on: October 06, 2006, 03:43:44 AM »

ok, you're right, pkzip is a dinosaur. but for within applications, zlib is one of the golden standards, trust me. another one is called gzip, the compression of choice for linux.

winzip doesn't have an API to do thins like compress to/from memory, it's all file based. what if you don't have file modification priviledges on the host computer? hehe...


Quote from: "google"
Results 1 - 10 of about 132,000,000 for gzip.


;P
Logged
yetifoot
Ancient Guru
****
Posts: 575



« Reply #14 on: October 06, 2006, 11:40:28 AM »

Quote from: "cha0s"

Quote from: "google"
Results 1 - 10 of about 132,000,000 for gzip.

;P


OMG THE WINNARR

Even with zlib, the security issue or bugginess issue comes into play.  If you use zlib.dll, then anyone could replace that.  If you statically link zlib, then your program may be prone to any bugs discovered in zlib.  So really there are no winners.
Logged

EVEN MEN OF STEEL RUST.
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!