首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Flash >

请教压缩的flash文件和没有压缩的flash文件有何区别,怎么编程实现这两种文件的转化

2012-02-23 
请问压缩的flash文件和没有压缩的flash文件有何区别,如何编程实现这两种文件的转化?请问压缩的flash文件和

请问压缩的flash文件和没有压缩的flash文件有何区别,如何编程实现这两种文件的转化?
请问压缩的flash文件和没有压缩的flash文件有何区别,如何编程实现这两种文件的转化?

很多的swf文件是压缩的Compressed   swf
有一些是没有压缩的     Uncompressed   swf


请问这两者有何区别,通过编程如何转化

[解决办法]
朋友,你所说的压缩与不压缩,是不是文件大小的改变呢?有什么用呢?
关注!!!!!!!!!
[解决办法]
flash文件规范说的很明白 从第8字节后采用zlib压缩

http://www.zlib.net/

ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
/*
Compresses the source buffer into the destination buffer. sourceLen is
the byte length of the source buffer. Upon entry, destLen is the total
size of the destination buffer, which must be at least the value returned
by compressBound(sourceLen). Upon exit, destLen is the actual size of the
compressed buffer.
This function can be used to compress a whole file at once if the
input file is mmap 'ed.
compress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer.
*/


ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
/*
Decompresses the source buffer into the destination buffer. sourceLen is
the byte length of the source buffer. Upon entry, destLen is the total
size of the destination buffer, which must be large enough to hold the
entire uncompressed data. (The size of the uncompressed data must have
been saved previously by the compressor and transmitted to the decompressor
by some mechanism outside the scope of this compression library.)
Upon exit, destLen is the actual size of the compressed buffer.
This function can be used to decompress a whole file at once if the
input file is mmap 'ed.

uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
*/
[解决办法]
肯定是你程序的问题了,我使用zlib对flash解压正确。
除了解压以外,flash头还有一个三个字节用来标识是不是经过压缩,你也要改过来,压缩过的为CSW,没有压缩的为FSW。
呵呵,可以试试我的软件,在我的blog上。

http://ar4ever.blogdriver.com

热点排行