Question about packer

Just starting out? Need help? Post your questions and find answers here.
Jeromyal
Enthusiast
Enthusiast
Posts: 204
Joined: Wed Jul 17, 2013 8:49 am

Question about packer

Post by Jeromyal »

I am perhaps a little confused about how to go about this.

I want to includebinary a 7z file under 400 Kb
Then search that pack internally for any particular file inside it to extract out.

Cant you open memory as a pack without it being a file?
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: Question about packer

Post by jacdelad »

Nope, packed files have always to be read from disc. If it contains only one file you can use CompressMemory(), save it and then include it (including the info how big it will be after unpacking) and include your own unpack routine
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Jeromyal
Enthusiast
Enthusiast
Posts: 204
Joined: Wed Jul 17, 2013 8:49 am

Re: Question about packer

Post by Jeromyal »

jacdelad wrote: Fri Aug 12, 2022 4:09 pm Nope, packed files have always to be read from disc. If it contains only one file you can use CompressMemory(), save it and then include it (including the info how big it will be after unpacking) and include your own unpack routine
I was afraid of that.
So if I understand what you have described.
I make a packaging program:
Load each file individually, Compress them in memory. Save them out as individual compressed data files. Then IncludeBinary() them into my application.

Then in my application, uncompress them in memory and then writedata(file, ?afile, ?afile_end - ?afile)
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: Question about packer

Post by jacdelad »

Yeah, that's what I wanted to say.
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
User avatar
idle
Always Here
Always Here
Posts: 5040
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Question about packer

Post by idle »

you can use EZpack to open files from memory, look at the examples in the zip to see how to use it

Topic
viewtopic.php?t=52586

download link
https://www.dropbox.com/s/f76f9cvjfmv88h9/EzPack.zip
Jeromyal
Enthusiast
Enthusiast
Posts: 204
Joined: Wed Jul 17, 2013 8:49 am

Re: Question about packer

Post by Jeromyal »

idle wrote: Sun Aug 14, 2022 1:11 am you can use EZpack to open files from memory, look at the examples in the zip to see how to use it

Topic
viewtopic.php?t=52586

download link
https://www.dropbox.com/s/f76f9cvjfmv88h9/EzPack.zip
Wow, super thanks idle! I can't wait to check this out.
tester
User
User
Posts: 30
Joined: Sun Dec 28, 2014 1:12 pm

Re: Question about packer

Post by tester »

idle wrote: Sun Aug 14, 2022 1:11 amdownload link
https://www.dropbox.com/s/f76f9cvjfmv88h9/EzPack.zip
Great job :!: .
Please fix the corruption of the EzPack_7_OpenFileOnDemand.pb file in line 34.
User avatar
idle
Always Here
Always Here
Posts: 5040
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Question about packer

Post by idle »

tester wrote: Sun Aug 28, 2022 9:36 pm
idle wrote: Sun Aug 14, 2022 1:11 amdownload link
https://www.dropbox.com/s/f76f9cvjfmv88h9/EzPack.zip
Great job :!: .
Please fix the corruption of the EzPack_7_OpenFileOnDemand.pb file in line 34.
Should be fixed now thanks.
Post Reply