如何在 .htaccess 文件中压缩 .OBJ 文件?
How to gzip a .OBJ file is it possible in the .htaccess file?
您好,我在网上找不到很多关于如何 gzip .obj 文件的信息,我确实设法压缩了它,将文件扩展名更改为 .gz,但这对我来说是不可取的。
我想对 .obj 文件进行 gzip 压缩,因为它是 13mb,这可能与 .htaccess 文件有关吗?如何处理呢? (保留 .obj 扩展名)。
提前致谢!
有可能。使用 mod_deflate
模块并修改 .htaccess 如下:
<ifmodule mod_deflate.c>
<ifmodule mod_mime.c>
Addtype text/plain .obj
</ifmodule>
AddOutputFilterByType DEFLATE text/plain
</ifmodule>
压缩前:
> curl --compressed -so /dev/null http://localhost/foo.obj -w '%{size_download}'
464590
压缩后:
> curl --compressed -so /dev/null http://localhost/foo.obj -w '%{size_download}'
148261
您好,我在网上找不到很多关于如何 gzip .obj 文件的信息,我确实设法压缩了它,将文件扩展名更改为 .gz,但这对我来说是不可取的。 我想对 .obj 文件进行 gzip 压缩,因为它是 13mb,这可能与 .htaccess 文件有关吗?如何处理呢? (保留 .obj 扩展名)。
提前致谢!
有可能。使用 mod_deflate
模块并修改 .htaccess 如下:
<ifmodule mod_deflate.c>
<ifmodule mod_mime.c>
Addtype text/plain .obj
</ifmodule>
AddOutputFilterByType DEFLATE text/plain
</ifmodule>
压缩前:
> curl --compressed -so /dev/null http://localhost/foo.obj -w '%{size_download}'
464590
压缩后:
> curl --compressed -so /dev/null http://localhost/foo.obj -w '%{size_download}'
148261