在PHP中使用Flash CompressionAlgorithm.DEFLATE ByteArray进行充气

在PHP中使用Flash CompressionAlgorithm.DEFLATE ByteArray进行充气,php,flash,apache-flex,actionscript,Php,Flash,Apache Flex,Actionscript,我试图在PHP中膨胀Flash压缩缓冲区 以下是我在Flex ActionScript中的内容: var comp:ByteArray = new ByteArray(); comp.writeObject(buffer); comp.compress(CompressionAlgorithm.DEFLATE); var request:URLRequest = new URLRequest(url); request.method = URLRequestMethod.POST; reques

我试图在PHP中膨胀Flash压缩缓冲区

以下是我在Flex ActionScript中的内容:

var comp:ByteArray = new ByteArray();
comp.writeObject(buffer);
comp.compress(CompressionAlgorithm.DEFLATE);
var request:URLRequest = new URLRequest(url);
request.method = URLRequestMethod.POST;
request.contentType = contentType;
request.data = comp;
loader.load(request);
comp
的内容将以post数据的形式上传到服务器。php脚本将使其膨胀:

$contents = gzinflate(file_get_contents($file));
问题在于,通过这种方式,
$contents
的内容与
缓冲区的内容不同。它确实膨胀了,但总是增加4个额外的字节。例如,32000字节变成32004字节。我不确定这是开始还是结束


有没有关于这4个字节是关于什么的文档,以及我应该如何在php中膨胀这些数据?谢谢。

原来神奇的字母是
0C 83 F4 01
。这4个字节被添加到未压缩数据的开头。我找不到这方面的任何文件。但是,通过从每个ByteArray的开头删除这4个字节,我可以得到原始数据