Skip to content

Commit

Permalink
snappy: add note on what check does
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
jqnatividad committed Apr 10, 2023
1 parent 7f76460 commit e3526aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/snappy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ fn decompress<R: Read, W: Write>(src: R, mut dst: W) -> CliResult<()> {
Ok(())
}

// check if a file is a valid snappy file
// check if a file is a snappy file
// note that we only read the first 50 bytes of the file
// and do not check the entire file for validity
fn check<R: Read>(src: R) -> bool {
let src = snap::read::FrameDecoder::new(src);

Expand Down

0 comments on commit e3526aa

Please sign in to comment.