-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3503d2e
commit 37fb262
Showing
3 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
main | ||
run test_decompression_does_not_fail | ||
pause | ||
break_all | ||
pause all | ||
continue | ||
break | ||
break | ||
main | ||
pause | ||
run | ||
break | ||
break | ||
break | ||
continue | ||
reak | ||
break | ||
break | ||
pause | ||
stop | ||
stop | ||
stop | ||
kill | ||
ruyn | ||
run | ||
exit | ||
run | ||
break | ||
run | ||
run | ||
break | ||
pause | ||
stop | ||
stop | ||
run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use std::io::Read; | ||
|
||
use mcap::sans_io::read::{LinearReader, ReadAction}; | ||
|
||
fn main() { | ||
let mut f = std::fs::File::open("tests/data/break_zstd_decompression.mcap") | ||
.expect("failed to open file"); | ||
let blocksize: usize = 1024; | ||
let mut reader = LinearReader::new(); | ||
while let Some(action) = reader.next_action() { | ||
match action.expect("failed to get next action") { | ||
ReadAction::GetRecord { data: _, opcode } => { | ||
print!("{},", opcode); | ||
} | ||
ReadAction::NeedMore(_) => { | ||
let read = f | ||
.read(reader.insert(blocksize)) | ||
.expect("failed to read from file"); | ||
reader.set_written(read); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters