mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-14 03:17:05 +00:00
proxyutils.py: Switch to gzip compression for writemem_compressed
lzma is too slow, not worth the gain now that we have USB. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
36a6c9de3e
commit
530069bbfa
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import serial, os, struct, sys, time, json, os.path, lzma, functools
|
||||
import serial, os, struct, sys, time, json, os.path, gzip, functools
|
||||
from asm import ARMAsm
|
||||
from proxy import *
|
||||
from tgtypes import *
|
||||
|
@ -87,7 +87,7 @@ class ProxyUtils(object):
|
|||
if not len(data):
|
||||
return
|
||||
|
||||
payload = lzma.compress(data)
|
||||
payload = gzip.compress(data)
|
||||
compressed_size = len(payload)
|
||||
|
||||
with self.heap.guarded_malloc(compressed_size) as compressed_addr:
|
||||
|
@ -95,7 +95,7 @@ class ProxyUtils(object):
|
|||
timeout = self.iface.dev.timeout
|
||||
self.iface.dev.timeout = None
|
||||
try:
|
||||
decompressed_size = self.proxy.xzdec(compressed_addr, compressed_size, dest, len(data))
|
||||
decompressed_size = self.proxy.gzdec(compressed_addr, compressed_size, dest, len(data))
|
||||
finally:
|
||||
self.iface.dev.timeout = timeout
|
||||
|
||||
|
|
Loading…
Reference in a new issue