Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 381
Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 382
Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 383
Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 384
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/languages/Language.php on line 20
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/mediawiki/includes/AutoLoader.php:1007) in /usr/local/www/mediawiki/includes/Feed.php on line 229
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/mediawiki/includes/AutoLoader.php:1007) in /usr/local/www/mediawiki/includes/WebResponse.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/mediawiki/includes/AutoLoader.php:1007) in /usr/local/www/mediawiki/includes/WebResponse.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/mediawiki/includes/AutoLoader.php:1007) in /usr/local/www/mediawiki/includes/WebResponse.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/mediawiki/includes/AutoLoader.php:1007) in /usr/local/www/mediawiki/includes/WebResponse.php on line 38 http://fileformats.archiveteam.org/index.php?action=history&feed=atom&title=PAK_%28Resident_Evil_1997%29PAK (Resident Evil 1997) - Revision history2024-12-30T07:20:53ZRevision history for this page on the wikiMediaWiki 1.19.2 Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007 http://fileformats.archiveteam.org/index.php?title=PAK_(Resident_Evil_1997)&diff=44991&oldid=prevJsummers: Jsummers moved page .PAK (Resident Evil 1997) to PAK (Resident Evil 1997)2023-08-27T16:01:14Z<p>Jsummers moved page <a href="/wiki/.PAK_(Resident_Evil_1997)" class="mw-redirect" title=".PAK (Resident Evil 1997)">.PAK (Resident Evil 1997)</a> to <a href="/wiki/PAK_(Resident_Evil_1997)" title="PAK (Resident Evil 1997)">PAK (Resident Evil 1997)</a></p>
<table class='diff diff-contentalign-left'>
<tr valign='top'>
<td colspan='1' style="background-color: white; color:black;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black;">Revision as of 16:01, 27 August 2023</td>
</tr></table>Jsummershttp://fileformats.archiveteam.org/index.php?title=PAK_(Resident_Evil_1997)&diff=44921&oldid=prevFoxtrot at 14:32, 25 August 20232023-08-25T14:32:40Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 14:32, 25 August 2023</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 200:</td>
<td colspan="2" class="diff-lineno">Line 200:</td></tr>
<br />
<b>Warning</b>: require(): Unable to allocate memory for pool. in <b>/usr/local/www/mediawiki/includes/AutoLoader.php</b> on line <b>1007</b><br />
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">[[Category:Resident Evil (1997)]]</ins></div></td></tr>
</table>Foxtrothttp://fileformats.archiveteam.org/index.php?title=PAK_(Resident_Evil_1997)&diff=44919&oldid=prevFoxtrot at 14:26, 25 August 20232023-08-25T14:26:56Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 14:26, 25 August 2023</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">{{FormatInfo</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">|formattype=electronic</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">|extensions={{ext|pak}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Restored|2016-12-22|https://web.archive.org/web/20161222090005/http://rewiki.regengedanken.de/wiki/.PAK_(Resident_Evil)}}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Restored|2016-12-22|https://web.archive.org/web/20161222090005/http://rewiki.regengedanken.de/wiki/.PAK_(Resident_Evil)}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
</table>Foxtrothttp://fileformats.archiveteam.org/index.php?title=PAK_(Resident_Evil_1997)&diff=44917&oldid=prevFoxtrot at 14:23, 25 August 20232023-08-25T14:23:46Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 14:23, 25 August 2023</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">{{Restored|2016-12-22|https://web.archive.org/web/20161222090005/http://rewiki.regengedanken.de/wiki/.PAK_(Resident_Evil)}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The .PAK file format is used by the PC version of Resident Evil (1997). It contains a compressed TIM image, using an algorithm similar to LZW.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The .PAK file format is used by the PC version of Resident Evil (1997). It contains a compressed TIM image, using an algorithm similar to LZW.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
</table>Foxtrothttp://fileformats.archiveteam.org/index.php?title=PAK_(Resident_Evil_1997)&diff=44914&oldid=prevFoxtrot: Created page with "The .PAK file format is used by the PC version of Resident Evil (1997). It contains a compressed TIM image, using an algorithm similar to LZW. == Structure == The file is a b..."2023-08-25T14:22:35Z<p>Created page with "The .PAK file format is used by the PC version of Resident Evil (1997). It contains a compressed TIM image, using an algorithm similar to LZW. == Structure == The file is a b..."</p>
<p><b>New page</b></p><div>The .PAK file format is used by the PC version of Resident Evil (1997). It contains a compressed TIM image, using an algorithm similar to LZW.<br />
<br />
== Structure ==<br />
The file is a bitstream, without any header.<br />
<br />
== Example decompression routine ==<br />
This source is partly based on LZW decoder from scummvm engine.<br />
<br />
<pre><br />
#include <stdio.h><br />
#include <fcntl.h><br />
<br />
unsigned char dstPointer[512<<10];<br />
int dstOffset;<br />
unsigned long dstLength;<br />
<br />
unsigned char *srcPointer;<br />
int srcOffset;<br />
unsigned char srcByte;<br />
int tmpMask;<br />
<br />
#define MAX_LENGTH 35024<br />
<br />
typedef struct {<br />
long flag;<br />
long index;<br />
long value; <br />
} re1_pack_t;<br />
<br />
re1_pack_t tmpArray2[MAX_LENGTH];<br />
unsigned char decodeStack[MAX_LENGTH];<br />
<br />
/* Load file in mem from filename, return buffer, update length */<br />
<br />
char *loadFile(char *filename, int *length)<br />
{<br />
int handle;<br />
char *buffer;<br />
<br />
/* Load file */<br />
handle = open(filename, O_RDONLY);<br />
if (handle<0) {<br />
fprintf(stderr, "Unable to open %s\n", filename); <br />
return NULL;<br />
}<br />
<br />
*length = lseek(handle, 0, SEEK_END);<br />
lseek(handle, 0, SEEK_SET); <br />
<br />
buffer = (char *)malloc(*length);<br />
if (buffer==NULL) {<br />
fprintf(stderr, "Unable to allocate %d bytes\n", length);<br />
return NULL;<br />
}<br />
<br />
read(handle, buffer, *length);<br />
close(handle);<br />
<br />
return buffer;<br />
}<br />
<br />
int re1_read_bits(int num_bits)<br />
{<br />
unsigned long value=0, mask;<br />
<br />
mask = 1<<(--num_bits);<br />
<br />
while (mask>0) {<br />
if (tmpMask == 0x80) {<br />
srcByte = srcPointer[srcOffset++];<br />
}<br />
<br />
if ((tmpMask & srcByte)!=0) {<br />
value |= mask;<br />
}<br />
<br />
tmpMask >>= 1;<br />
mask >>= 1;<br />
<br />
if (tmpMask == 0) {<br />
tmpMask = 0x80;<br />
}<br />
}<br />
<br />
return value;<br />
}<br />
<br />
int decodeString(int decodeStackOffset, unsigned long code)<br />
{<br />
int i;<br />
<br />
for (i=0; code>255; ) {<br />
decodeStack[decodeStackOffset++] = tmpArray2[code].value;<br />
code = tmpArray2[code].index;<br />
i++;<br />
}<br />
decodeStack[decodeStackOffset] = code;<br />
<br />
return decodeStackOffset;<br />
}<br />
<br />
void re1_depack(unsigned char *src, int src_length)<br />
{<br />
int num_bits_to_read, i;<br />
int lzwnew, c, lzwold, lzwnext;<br />
<br />
srcPointer = src;<br />
srcOffset = 0;<br />
tmpMask = 0x80;<br />
srcByte = 0; <br />
dstOffset = 0;<br />
<br />
memset(tmpArray2, 0, sizeof(tmpArray2));<br />
<br />
for(;;) {<br />
for (i=0; i<MAX_LENGTH; i++) {<br />
tmpArray2[i].flag = 0xffffffff;<br />
}<br />
lzwnext = 0x103;<br />
num_bits_to_read = 9;<br />
<br />
c = lzwold = re1_read_bits(num_bits_to_read);<br />
<br />
if (lzwold == 0x100) {<br />
break;<br />
}<br />
<br />
dstPointer[dstOffset++] = c;<br />
<br />
for(;;) {<br />
lzwnew = re1_read_bits(num_bits_to_read);<br />
<br />
if (lzwnew == 0x100) {<br />
dstLength = dstOffset;<br />
return;<br />
}<br />
<br />
if (lzwnew == 0x102) {<br />
break;<br />
}<br />
<br />
if (lzwnew == 0x101) {<br />
num_bits_to_read++;<br />
continue;<br />
}<br />
<br />
if (lzwnew >= lzwnext) {<br />
decodeStack[0] = c;<br />
i = decodeString(1, lzwold);<br />
} else {<br />
i = decodeString(0, lzwnew);<br />
} <br />
<br />
c = decodeStack[i];<br />
<br />
while (i>=0) {<br />
dstPointer[dstOffset++] = decodeStack[i--];<br />
}<br />
<br />
tmpArray2[lzwnext].index = lzwold;<br />
tmpArray2[lzwnext].value = c;<br />
lzwnext++;<br />
<br />
lzwold = lzwnew;<br />
}<br />
}<br />
<br />
dstLength = dstOffset;<br />
}<br />
<br />
int main(int argc, char **argv)<br />
{<br />
int length;<br />
unsigned char *fileInMem;<br />
<br />
if (argc<2) {<br />
return 1;<br />
}<br />
<br />
fileInMem = loadFile(argv[1], &length);<br />
if (fileInMem==NULL) {<br />
return 1;<br />
}<br />
<br />
re1_depack(fileInMem, length);<br />
<br />
/* Now you have the decompressed file at dstPointer */<br />
/* and length is dstLength */<br />
<br />
free(fileInMem);<br />
<br />
return 0;<br />
}<br />
</pre></div>Foxtrot Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007