mirror of
https://github.com/9001/copyparty.git
synced 2026-03-24 17:13:01 +10:00
add content-encoding for precompressed deps
This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import print_function, unicode_literals
|
||||
|
||||
import re
|
||||
import sys
|
||||
import struct
|
||||
import hashlib
|
||||
import threading
|
||||
import subprocess as sp # nosec
|
||||
@@ -416,5 +417,11 @@ def chkcmd(*argv):
|
||||
return sout, serr
|
||||
|
||||
|
||||
def gzip_orig_sz(fn):
|
||||
with open(fsenc(fn), 'rb') as f:
|
||||
f.seek(-4, 2)
|
||||
return struct.unpack('I', f.read(4))[0]
|
||||
|
||||
|
||||
class Pebkac(Exception):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user