Pak Archive Dll
#41
Posted 15 January 2009 - 11:24 PM
I may be wrong, I'm no expert.
#42
Posted 16 January 2009 - 12:04 AM
From the reliable WikipediaHuffman coding today is often used as a "back-end" to some other compression method. DEFLATE (PKZIP's algorithm) and multimedia codecs such as JPEG and MP3 have a front-end model and quantization followed by Huffman coding.
#43
Posted 30 January 2009 - 01:22 AM
- Saving to Files is Complete!
- Loading from Files is Complete!
Please notify me of any crashes (i.e. "An unexpected error has occurred when running the game") or bugs such as files not writing fully/encryption issue.
#44
Posted 19 April 2009 - 06:53 PM
#45
Posted 19 April 2009 - 07:17 PM
Edited by GMREC1111, 10 May 2009 - 11:18 AM.
#46
Posted 19 April 2009 - 07:38 PM
To add a file to it you load the PAK then add to it, don't execute AddFile and then save without loading the old PAK.
Warning: This seems to crash on binary files, I have not found any way to fix this.
Alright I think I got it working. Thanks
#47
Posted 19 April 2009 - 08:52 PM
#48
Posted 19 April 2009 - 09:34 PM
Edit: Oh what's the difference between "pak_file_add", "pak_file_add_from_file", and "pak_file_save_to_file"?
Edited by ShingingDB, 19 April 2009 - 09:40 PM.
#49
Posted 19 April 2009 - 10:23 PM
pak_file_add_from_file - Add file to the current pak file (in memory). The added file's data is read from a real file.
pak_file_save_to_file - Save the data of a file in a pak file (in memory) to a file on the disk.
Regards,
Chris.
#50
Posted 22 April 2009 - 10:56 AM
Im working on a pak file - I want to add a file to the pak file. Why do I need to put two arguments?
Oh, and by the way, the example you provided wont work.
EDIT: It fails to load any pak file.
This is what I tried:
pak_init(true);
show_message("Initiated");
pak_load(working_directory + "\AFs.pak");
show_message("Loaded AFs.pak");
pak_file_save_to_file(working_directory + "\Files.txt", "Files.txt");
show_message("Saved Files.txt");
file = file_text_open_read("Files.txt");
while (!file_text_eof(file))
{
filename = file_text_read_string(file);
show_message("File found: " + filename);
file_text_readln(file);
pak_file_save_to_file(working_directory + "\" + filename, filename);
show_message("Saved " + filename);
}
pak_reset();
show_message("
Reset complete");
pak_free();
show_message("Free complete");
game_end();The pak file exists. I get a message "Initiated" and I dont get the second message after the loading.
Edited by Mister_M, 22 April 2009 - 11:12 AM.
#51
Posted 22 April 2009 - 12:21 PM
pak_file_save_to_file
#52
Posted 22 April 2009 - 07:41 PM
The problem should only occur when you have an "empty" PAK, meaning it has no files in it. Correction, it crashes on an empty file.
Edited by GMREC1111, 22 April 2009 - 07:54 PM.
#53
Posted 24 April 2009 - 05:24 AM
Everything works fine, but when I try to unpack a .BMP, nothing gets created. The file in the .PAK is called "8.bmp". I checked pak_file_index("8.bmp") and it returns 0, so the file is there. However, after calling pak_file_save_to_file(working_directory+"/8.bmp","8.bmp"), no file is created. I even tried swapping the arguments, but nothing works. I'm not getting any errors, either.
Any ideas?
-IMP
#54
Posted 10 May 2009 - 03:49 AM
IceMetalPunk, can you make sure the index is not negative one before trying to save the file, that if, if you didn't already. There may be a problem loading non-text files. It still counts the strings as null-terminated, not good.
Update: You can now store (and retrieve) non-text files in the PAK without problems.
Edited by GMREC1111, 10 May 2009 - 11:12 AM.
#55
Posted 15 May 2009 - 08:49 PM
#56
Posted 16 May 2009 - 01:38 AM
If you do use it for anything, please PM me as I'd like to see how you used it. It can do much more then file storing. Now, I think I will begin working on that encryption (needs an upgrade).
#57
Posted 22 May 2009 - 11:19 AM
- Added an archive manager.
To use the archive manager, right click on the window to see a list of commands. You can also drag files into the PAK, you can open a PAK by dragging it into the window, too.
Update:
- Hopefully fixed a small glitch that occurred with the Covac Software link.
Update:
- Fixed the directory dropping into the PAK Manager, it will add all files and folders (including their files and folders) into the PAK. Please note that forward slashes are more commonly used for directories (see PAK Explorer).
If you encounter a bug with the PAK Manager, kindly PM me with details about it, and how/when it occurs.
Edited by GMREC1111, 24 May 2009 - 05:47 PM.
#58
Posted 06 June 2009 - 11:19 PM
[Edit]
Oh Covac software, no wonder. ;P
Edited by Krisando, 06 June 2009 - 11:20 PM.
#59
Posted 07 June 2009 - 12:42 PM
The PAK code was glitchy, the archive manager was annoying. He didn't do all of it.
#60
Posted 11 June 2009 - 08:56 PM
The PAK code used a better reading system and is faster. The archieve manager was my idea.The PAK code was glitchy, the archive manager was annoying. He didn't do all of it.
Just to clear some points
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











