Skip to content

Commit

Permalink
ENH: Speed up IO for nexrad level2 file (#1504)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 authored Jan 4, 2024
1 parent c2fc6d8 commit 297e9eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyart/io/nexrad_level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def _decompress_records(file_handler):
cbuf = file_handler.read() # read all data from the file
decompressor = bz2.BZ2Decompressor()
skip = _structure_size(VOLUME_HEADER) + CONTROL_WORD_SIZE
buf = decompressor.decompress(cbuf[skip:])
buf = bytearray(decompressor.decompress(cbuf[skip:]))
while len(decompressor.unused_data):
cbuf = decompressor.unused_data
decompressor = bz2.BZ2Decompressor()
Expand Down

0 comments on commit 297e9eb

Please sign in to comment.