我正在创建包含各种文件上传服务的东西,我需要存储使用zlib压缩的数据压缩 ()函数。 我通过互联网发送它已经压缩,但我需要知道远程服务器上未压缩的文件大小。 有没有办法在没有首先解压缩服务器上的数据的情况下找出这些信息,只是为了提高效率? 这就是我现在正在做的事情,但是如果有一条捷径我很乐意接受它。 p>
顺便说一下,为什么它被称为uncompress? 这对我来说听起来很糟糕,我一直以为它会解压缩...... p> div>
I'm creating something that includes a file upload service of sorts, and I need to store data compressed with zlib's compress() function. I send it across the internet already compressed, but I need to know the uncompressed file size on the remote server. Is there any way I can figure out this information without uncompress()ing the data on the server first, just for efficiency? That's how I'm doing it now, but if there's a shortcut I'd love to take it.
By the way, why is it called uncompress? That sounds pretty terrible to me, I always thought it would be decompress...
我正在创建包含各种文件上传服务的东西,我需要存储使用zlib压缩的数据压缩 ()函数。 我通过互联网发送它已经压缩,但我需要知道远程服务器上未压缩的文件大小。 有没有办法在没有首先解压缩服务器上的数据的情况下找出这些信息,只是为了提高效率? 这就是我现在正在做的事情,但是如果有一条捷径我很乐意接受它。 p>
顺便说一下,为什么它被称为uncompress? 这对我来说听起来很糟糕,我一直以为它会解压缩...... p> div>