PHP Classes

gzuncompress on CWS does not work

Recommend this page to a friend!

      SWF header parser  >  All threads  >  gzuncompress on CWS does not work  >  (Un) Subscribe thread alerts  
Subject:gzuncompress on CWS does not work
Summary:For example, this class fails on http://www.otsfd.com/index.swf
Messages:2
Author:James Pearce
Date:2008-09-04 12:01:07
Update:2008-09-04 12:08:47
 

 


  1. gzuncompress on CWS does not work   Reply   Report abuse  
Picture of James Pearce James Pearce - 2008-09-04 12:01:08
Warning: gzuncompress() [function.gzuncompress]: data error in swfheader.class.php on line 100
FILE: http://www.otsfd.com/index.swf
MAGIC: CWS (COMPRESSED)
VERSION: 8
SIZE: 261457 bytes
WIDHT: 0
HEIGHT: 0
FPS: 0.0 Frames/s
FRAMES: 0 FRAME


Any ideas how to fix this? Or use an alternative unzip library? Or what?

Thanks
James

  2. Re: gzuncompress on CWS does not work   Reply   Report abuse  
Picture of James Pearce James Pearce - 2008-09-04 12:08:47 - In reply to message 1 from James Pearce
Fixed myself... the clue is in the php notes for this function:

function gzuncompress_crc32($data) {
$f = tempnam('/tmp', 'gz_fix');
file_put_contents($f, "\x1f\x8b\x08\x00\x00\x00\x00\x00" . $data);
return file_get_contents('compress.zlib://' . $f);
}


Sorry for the bother ;-)