Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #148 from darrenldl/dev
Browse files Browse the repository at this point in the history
Calc mode output text polish, removed libcrc source code, updated README accordingly
  • Loading branch information
darrenldl committed Apr 6, 2019
2 parents 275d818 + 2a70a1a commit ef53c3a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 281 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ If blockyarchive has been useful to you, and you would like to donate to me for

The crcccitt code is translated from the C implementation in [libcrc](https://github.com/lammertb/libcrc) and are under the same MIT License as used by libcrc and as stated in libcrc source code, the license text of the crcccitt.c is copied over to `crcccitt/build.rs`, `crcccitt/src/lib.rs`, `build.rs` and `src/crc_ccitt.rs` as well

The C source code of crcccitt copied directly from libcrc are under the MIT License as used by libcrc, the files are in ```libcrc_crcccitt```

#### Official SeqBox code

The files in tests folder copied from official SeqBox are under its license, which is MIT as of time of writing
Expand Down
107 changes: 0 additions & 107 deletions libcrc_crcccitt/checksum.h

This file was deleted.

162 changes: 0 additions & 162 deletions libcrc_crcccitt/crcccitt.c

This file was deleted.

20 changes: 10 additions & 10 deletions src/cli_calc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ pub fn calc<'a>(matches: &ArgMatches<'a>) -> i32 {
if burst == 0 {
print_block!(
" The container can tolerate {} SBX block corruptions", par;
" in each block set.";
" in each block set";
"";
" A block set consists of {} blocks ({} bytes).", (data + par), (data + par) * block_size;
" A block set consists of {} blocks ({} bytes)", (data + par), (data + par) * block_size;
"";
" In total, {} blocks({} bytes) may be corrupted in", par, par * block_size;
" each block set.";
" each block set";
);
} else {
if burst == 1 {
Expand All @@ -169,23 +169,23 @@ pub fn calc<'a>(matches: &ArgMatches<'a>) -> i32 {
let super_block_set_size = (data + par) * burst;

print_block!(" The container can tolerate {} burst SBX block corruptions in", par;
" each super block set ({} interleaved block sets).", burst;
" each super block set ({} interleaved block sets)", burst;
"";
" A block set consists of {} blocks ({} bytes).", block_set_size, block_set_size * block_size;
" A block set consists of {} blocks ({} bytes)", block_set_size, block_set_size * block_size;
"";
" A super block set consists of {} blocks ({} bytes).", super_block_set_size, super_block_set_size * block_size;
" A super block set consists of {} blocks ({} bytes)", super_block_set_size, super_block_set_size * block_size;
"";
" Each burst error may be up to {} blocks ({} bytes) in size.", burst, burst * block_size;
" Each burst error may be up to {} blocks ({} bytes) in size", burst, burst * block_size;
"";
" In total, {} sets of {} consecutive blocks ({} bytes) may be", par, burst, burst * block_size;
" corrupted in each super block set.";
" corrupted in each super block set";
"";
" The sets of corrupted blocks may be connected as well, so the";
" largest single burst error that can be tolerated in each super";
" block set is {} blocks({} bytes) in size.", par * burst, par * burst * block_size;
" block set is {} blocks({} bytes) in size", par * burst, par * burst * block_size;
"";
" Note that the actual tolerance depends on the behaviour of";
" the file system.";
" the file system";
);
}

Expand Down

0 comments on commit ef53c3a

Please sign in to comment.