New Lz4 Api

print ( )
work on pyton 3.8 for me
This commit is contained in:
Kronos2308 2020-06-16 05:03:22 +01:00 committed by GitHub
commit 3e9e5c86c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys, lz4 import sys, lz4 ,lz4.block
from struct import unpack as up from struct import unpack as up
def lz4_compress(data): def lz4_compress(data):
@ -19,7 +19,7 @@ def split_binary(data):
def main(argc, argv): def main(argc, argv):
if argc != 3: if argc != 3:
print 'Usage: %s in outdir' % argv[0] print ('Usage: %s in outdir' % argv[0])
return 1 return 1
with open(argv[1], 'rb') as f: with open(argv[1], 'rb') as f:
data = f.read() data = f.read()