Tag: gzip

如何“微调”Javascript代码

JQuery有两个版本供下载,一个是生产(19KB,Minified和Gzipped) ,另一个是开发(120KB,未压缩的代码) 。 现在紧凑的19kb版本,如果你下载它,你会看到仍然是一个JavaScript的可执行代码。 他们是如何实现它的? 而且我怎样才能把这样的代码“缩小”呢?

启用IIS7 gzip

我怎样才能启用IIS7 gzip静态文件,如js和css,以及如何testing如果IIS7真的gziping他们之前发送到客户端? 谢谢!

TypeError:'str'不支持缓冲区接口

plaintext = input("Please enter the text you want to compress") filename = input("Please enter the desired filename") with gzip.open(filename + ".gz", "wb") as outfile: outfile.write(plaintext) 上面的python代码给我下面的错误: Traceback (most recent call last): File "C:/Users/Ankur Gupta/Desktop/Python_works/gzip_work1.py", line 33, in <module> compress_string() File "C:/Users/Ankur Gupta/Desktop/Python_works/gzip_work1.py", line 15, in compress_string outfile.write(plaintext) File "C:\Python32\lib\gzip.py", line 312, in write self.crc = […]