From 015487da8585867a66f9f0fb48adec29e2d1ac6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Mon, 24 Feb 2025 17:01:55 +0100 Subject: [PATCH] updated compression level of Zstd stdata files --- shaketune/helpers/accelerometer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shaketune/helpers/accelerometer.py b/shaketune/helpers/accelerometer.py index e7c5e99..49cf37f 100644 --- a/shaketune/helpers/accelerometer.py +++ b/shaketune/helpers/accelerometer.py @@ -30,6 +30,7 @@ STOP_SENTINEL = 'STOP_SENTINEL' WRITE_TIMEOUT = 300 WAIT_FOR_SAMPLE_TIMEOUT = 30 +COMPRESSION_LEVEL = 11 class Measurement(TypedDict): @@ -65,7 +66,7 @@ def __init__(self, chunk_size: int, k_reactor=None, stdata_filename: Path = None def _writer_loop(self, output_file: Path, write_queue: Queue, is_writing: Value): try: with open(output_file, 'wb') as f: - cctx = ZstdCompressor(level=3) + cctx = ZstdCompressor(level=COMPRESSION_LEVEL) with cctx.stream_writer(f) as compressor: while True: meas = write_queue.get()