"UnofficialTRLE Chatbox Network - Live Help & Chat
TRLE FAQ and Community
  Eidos Interactive Forums
  Tomb Raider - The Level Editor
  PAK logos

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   PAK logos
Malte
Member

Posts: 282
From:Germany
Registered: Apr 2002

posted 06-08-2002 08:06 AM     Click Here to See the Profile for Malte   Click Here to Email Malte     Edit/Delete Message   Reply w/Quote
Hi
Are the logos (PAK files) compressed with ZLIB? I tried some compression levels of ZLIB (4-9, the others cause the program to crash, I don't know why) but the size of the PAK file wont be the same as the PAK file compressed with packer.exe.

I really need this for BmpToRaw 3.

------------------
Download my projects:

Levels:
Search in Venice!

Tools:
BmpToRaw 2

Skies:
Star sky

IP: Logged

TRWad
Member

Posts: 453
From:Rotterdam
Registered: Dec 2001

posted 06-08-2002 09:31 AM     Click Here to See the Profile for TRWad   Click Here to Email TRWad     Edit/Delete Message   Reply w/Quote
yes, they are compressed. I don't know the level. Try asking turbo pascal. He uses compression in treditor. I guess the tr5 compression has the same level.

IP: Logged

aktrekker
Member

Posts: 1127
From:WA, USA
Registered: Apr 2001

posted 06-08-2002 11:04 AM     Click Here to See the Profile for aktrekker     Edit/Delete Message   Reply w/Quote
The compression is probably the same as for TR4 files. They use deflate to compress and use the default compression level.

IP: Logged

Malte
Member

Posts: 282
From:Germany
Registered: Apr 2002

posted 06-08-2002 11:18 AM     Click Here to See the Profile for Malte   Click Here to Email Malte     Edit/Delete Message   Reply w/Quote
I used the function compress2() to compress the data of the RAW file. I tried level 4 but the size of the compressed data is too big. I could not use lower levels. The program crashes when I call compress2() with a lower level than 4. What's wrong?

IP: Logged

TRWad
Member

Posts: 453
From:Rotterdam
Registered: Dec 2001

posted 06-08-2002 11:27 AM     Click Here to See the Profile for TRWad   Click Here to Email TRWad     Edit/Delete Message   Reply w/Quote
Maybe you should try using the compress function, but I don't try. Ask turbo or popov if it fails

IP: Logged

Malte
Member

Posts: 282
From:Germany
Registered: Apr 2002

posted 06-08-2002 12:21 PM     Click Here to See the Profile for Malte   Click Here to Email Malte     Edit/Delete Message   Reply w/Quote

I made a mistake in the code. If you now use the normal compress() function (level 6 I think) the size of a PAK file will be as big as if you compressed the RAW with packer.exe (the same RAW of course). The size of the PAK files are exactly the same.


The game crashes when it starts with a PAK logo compressed with ZLIB. And I can't uncompress PAKs created by packer.exe with uncompress() (for the PAKViewer of the next version of BmpToRaw).

IP: Logged

Malte
Member

Posts: 282
From:Germany
Registered: Apr 2002

posted 06-10-2002 12:21 PM     Click Here to See the Profile for Malte   Click Here to Email Malte     Edit/Delete Message   Reply w/Quote
No, wrong: A PAK file created by packer.exe is always 4 bytes bigger. But the problem is not only the different size. Many bytes of a PAK file created by packer.exe and with ZLIB (compress()) are different.

IP: Logged

aktrekker
Member

Posts: 1127
From:WA, USA
Registered: Apr 2001

posted 06-11-2002 02:14 AM     Click Here to See the Profile for aktrekker     Edit/Delete Message   Reply w/Quote
I took a look at the PAK file on my machine. I followed a little bit of the code in zlib and it appeared that the file is a valid zlib file, but I didn't follow very far.
The first 4 bytes are a DWORD containing the uncompressed size of the data. If you handle that right, you *should* be able to uncompress the file. Compressing it exactly the same might be a problem.
I suppose I could do a quicky test program and see if I can uncompress it without any errors. If it is important to anyone.

IP: Logged

Malte
Member

Posts: 282
From:Germany
Registered: Apr 2002

posted 06-11-2002 05:15 AM     Click Here to See the Profile for Malte   Click Here to Email Malte     Edit/Delete Message   Reply w/Quote
Thank you. The DWORD value has to be 512*256*3, hasn't it (because the size of an uncompressed logo RAW is always 512*256*3)?

I really need this for BmpToRaw 3. Then version 3 (last version) would be ready!

IP: Logged

Malte
Member

Posts: 282
From:Germany
Registered: Apr 2002

posted 06-11-2002 05:27 AM     Click Here to See the Profile for Malte   Click Here to Email Malte     Edit/Delete Message   Reply w/Quote
YOU ARE GREAT, AKTREKKER

The DWORD value was the only bug. Now it works perfectly. ZLIB, standard compression.

Thank you very much!!!

IP: Logged

TheMask
Member

Posts: 409
From:the Coco Bongo Club Registered: Dec 2000                  Registered: Dec 2001
Registered: May 2002

posted 06-11-2002 06:11 AM     Click Here to See the Profile for TheMask   Click Here to Email TheMask     Edit/Delete Message   Reply w/Quote
Does that mean the third version is ready ?

IP: Logged

Malte
Member

Posts: 282
From:Germany
Registered: Apr 2002

posted 06-11-2002 07:07 AM     Click Here to See the Profile for Malte   Click Here to Email Malte     Edit/Delete Message   Reply w/Quote
Yes, but it is not already uploaded, but it will be uploaded soon!

IP: Logged

All times are PST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Eidos.com

[Copyright 1999/2000 - Eidos Interactive, Inc.; Mpath Interactive]

Powered by Infopop www.infopop.com © 2000
Ultimate Bulletin Board 5.45c