Packer/Unpacker, does it work on CAB files?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Fangbeast.

Just updated my PureBASIC, fixed a few issues.

Does anyone know if these compression functions in this new version uncompress archive files or is it just for normal data?? If so, I am still desperate for internal CAB format compression/decompression

Fangles
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

Let me explain a few words about Compression and Cabs.
The Compression Fred did is a non standard but very effectivly one.
You can't use it with Zip's or Cab's archives,cause thy decompress only
ownmadeblocks.And there is no storage on Length or other Fileinformation
inside the compressed block.
If you must not use Cabs(Why do you prefer it ?), wait for a few days.
I'm try to wrote a code for a archiver-format(like those in Zips etc.)
and using the PB-Compression-routines.And not only using with external archives as with the compiled EXE and embedded archive too.
(to make One-single-File with all needed file inself)
The jcalg-decompression-algo. is very fast and good for a fast machinecode-compiler.
Some Hint:
Fred implemented a Executecommand (Shell or ExecutePRG) with a wait-Flag.It can help you with the expand.command (and can be hidden).

Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

take a closer look at:
http://msdn.microsoft.com/library/defau ... r_8jqr.asp

Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Fangbeast.
Siggi, I don't have the experience with Microsoft languages or the technical competence to understand anything on that page.I just want someone who does to write s simple CAB decompression routine in Purebasic that I can follow!!! I would even use the Win32API to do it if I knew what I was doing because I only need the decompression and I understand that the Lzcopy (??) command has something to do with it.

Sorry.

Fangles
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by wavemaker.

Is this what you're looking for?

Code: Select all


;
; Use this info to modify the example
;
;Microsoft (R) Cabinet Extraction Tool - Version (16) 1.00.603.0 (08/14/97)
;Copyright (c) Microsoft Corp 1994-1997. All rights reserved.
;
;EXTRACT [/Y] [/A] [/D | /E] [/L dir] cabinet [filename ...]
;EXTRACT [/Y] source [newname]
;EXTRACT [/Y] /C source destination
;
;  cabinet  - Cabinet file (contains two Or more files).
;  filename - Name of the file To extract from the cabinet.
;             Wild cards And multiple filenames (separated by
;             blanks) may be used.
;
;  source   - Compressed file (a cabinet with only one file).
;  newname  - New filename To give the extracted file.
;             If not supplied, the original name is used.
;
;  /A         Process ALL cabinets.  Follows cabinet chain
;             starting in first cabinet mentioned.
;  /C         Copy source file To destination (To copy from DMF disks).
;  /D         Display cabinet directory (use with filename To avoid extract).
;  /E         Extract (use instead of *.* To extract all files).
;  /L dir     Location To place extracted files (Default is current directory).
;  /Y         Do not prompt before overwriting an existing file.
;
; The example extracts files from the selected .cab file
;

file$ = OpenFileRequester("Open .cab file","","Compressed .CAB files | *.cab",0)
RunProgram("C:\Windows\Command\EXTRACT.exe","/E "+file$,0)
End

Or explain it, please. Bye,

Juan Calderón Alonso
Registered user
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Fangbeast.
Is this what you're looking for?

Or explain it, please. Bye,

Juan Calderón Alonso
Registered user
I already explained to Siggi and everyone else that I DON't want to shell out to an external program, I want to do it internally in PureBasic!! For the people who are testing my program, that's one more file for them to lose.

I need a simple library to be able to decompress one file out of a designated CAB compressed file.

But, I do not have experience to use the Win32 API or the technical competence.

Fangles
Post Reply