Wrappers for some compression libraries (x86/x64)

Share your advanced PureBasic knowledge/code with the community.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Wrappers for some compression libraries (x86/x64)

Post by luis »

Arcturus wrote:Link seems to be brocken... Unless that's just me?
It works, retry and if you have still problems PM me and I'll send it to you by email if you like.
"Have you tried turning it off and on again ?"
A little PureBasic review
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: Wrappers for some compression libraries (x86/x64)

Post by SeregaZ »

this is some test? so many files... how i can unpack files from BZIP2 type?


or even case is worth...

first i need to add two symbols to this file for change signature:
h91AY&SYж to BZh91AY&SYж

than it can unpack, but inside second file, i must to do same thing - change signature.

than read this unpacked xml file (all this make inside memory, without temp files)

than export to exel... i am almost hanged


so i want to do this and... how to unpack BZIP2? add 2 symbolsi think will be easy... so first just unpack?
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: Wrappers for some compression libraries (x86/x64)

Post by SeregaZ »

read xml and export to exel i done, but i am still don't know how to unpack? as i understand this code work with special pak: one files - one pak, but in my case inside pak a few files. how to unpack in this case?

i found some GnuWin32 programm, and i try to use bunzip2.exe for unpack and see what happen - it unpack, but all files mix inside one... so i am still stuck.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Wrappers for some compression libraries (x86/x64)

Post by jassing »

Arcturus wrote:Link seems to be broken... Unless that's just me?
I'm gonna go with "how can anyone know?" specifically, to which link are you referring?
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: Wrappers for some compression libraries (x86/x64)

Post by SeregaZ »

up: as i found - this is tar.bz2 format and it must be unpack by two different programs.
first unpack this file use bz2, than tar? have PB this tar and bz2 user library?
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Wrappers for some compression libraries (x86/x64)

Post by luis »

@seregaz, what you are asking has not much to do with the code posted here.
luis wrote: for the compression/decompression of memory buffers
These are simply the algorithms to pack/unpack memory buffers, there is no file system and/or archive support whatsoever. They are meant to build up your own file format (if needed) on top of them.

About your file, yes, tar-zipped files are common and you are correct it's a dual stage compression, or better... one archiver (tar) + one compressor (gzip or bzip).

Searching in the forum I found these two posts:

tar.gz Module
http://www.forums.purebasic.com/english ... 12&t=55640

My TAR extraction routines
http://www.purebasic.fr/english/viewtop ... 12&t=41417

Some info on the tar format (it's very simple) -> http://en.wikipedia.org/wiki/Tar_%28computing%29

Better to continue there or in coding questions :wink:
"Have you tried turning it off and on again ?"
A little PureBasic review
Post Reply