Skip to content

Commit

Permalink
updated compression level of Zstd stdata files
Browse files Browse the repository at this point in the history
  • Loading branch information
Frix-x committed Feb 24, 2025
1 parent f022406 commit 015487d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shaketune/helpers/accelerometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
STOP_SENTINEL = 'STOP_SENTINEL'
WRITE_TIMEOUT = 300
WAIT_FOR_SAMPLE_TIMEOUT = 30
COMPRESSION_LEVEL = 11


class Measurement(TypedDict):
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 015487d

Please sign in to comment.