Page 1 of 1

packer problem

Posted: Thu May 23, 2013 7:28 am
by lule
Hi,

I've got problems with packer functions
AMD64, Windows 7 , PureBasic 5.11 (Windows - x64)

Code: Select all

UseBriefLZPacker()
;UseZipPacker()
;UseLZMAPacker()

If CreatePack(0, GetHomeDirectory() + "test.zip")
	For i = 1 To 100
		AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/Geebee2.bmp", "Dir"+Str(i)+"\Geebee"+Str(i)+".bmp")
		AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/world.png", "Dir"+Str(i)+"\world"+Str(i)+".png")
	Next
	ClosePack(0)
EndIf
With UseZipPacker() pack file limit size : 693Ko after, files are not included
With UseBriefLZPacker(), cannot open file result with 7zip last version
With UseLZMAPacker(), no pack file generated

Re: packer problem

Posted: Sat Jun 08, 2013 10:11 am
by lule
Am I doing something wrong, or is it a bug?

Re: packer problem

Posted: Sat Jun 08, 2013 10:18 am
by Blankname

Code: Select all

UseZipPacker()

If CreatePack(0, GetHomeDirectory() + "test.zip")
   For i = 1 To 100
      AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/Geebee2.bmp", "Dir"+Str(i)+"\Geebee"+Str(i)+".bmp")
      AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/world.png", "Dir"+Str(i)+"\world"+Str(i)+".png")
   Next
   ClosePack(0)
EndIf
Works fine for me.

Re: packer problem

Posted: Sat Jun 08, 2013 10:24 am
by ts-soft
UseZipPacker works fine.
UseBriefLZPacker cant be unpacked by another packer, there is no default-packfile format, you can unpack it by PureBasic.
UseLZMAPacker doesn't support packing Archivfiles, only unpacking, see the helpfile.

Re: packer problem

Posted: Mon Sep 09, 2013 3:43 pm
by lule

Code: Select all

UseZipPacker()
If FileSize(GetHomeDirectory() + "test.zip")
	DeleteFile(GetHomeDirectory() + "test.zip")
EndIf
If CreatePack(0, GetHomeDirectory() + "test.zip")
   For i = 1 To 100
      AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/Geebee2.bmp", "Dir"+Str(i)+"\Geebee"+Str(i)+".bmp")
      AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/world.png", "Dir"+Str(i)+"\world"+Str(i)+".png")
   Next
   ClosePack(0)
EndIf
Always the same problem. There is no "Dir" upper 48 in the zip file as result of my Code. Is it a bug?

Re: packer problem

Posted: Mon Sep 09, 2013 3:51 pm
by Crusiatus Black
It works fine here, it creates a zipfile with Dir1 to Dir100 with in each directory two files.
I must say, I tried this code with PB 5.2, not 5.11

Re: packer problem

Posted: Mon Sep 09, 2013 4:01 pm
by IdeasVacuum