mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 08:47:47 +02:00
Finish up rsync for file receives
This commit is contained in:
@@ -192,3 +192,10 @@ class ZlibCompressor:
|
||||
|
||||
def flush(self) -> bytes:
|
||||
return self.c.flush()
|
||||
|
||||
|
||||
def print_rsync_stats(total_bytes: int, delta_bytes: int, signature_bytes: int) -> None:
|
||||
print('Rsync stats:')
|
||||
print(f' Delta size: {human_size(delta_bytes)} Signature size: {human_size(signature_bytes)}')
|
||||
frac = (delta_bytes + signature_bytes) / max(1, total_bytes)
|
||||
print(f' Transmitted: {human_size(delta_bytes + signature_bytes)} of a total of {human_size(total_bytes)} ({frac:.1%})')
|
||||
|
||||
Reference in New Issue
Block a user