More const's and readability improvements

This commit is contained in:
Sean Purcell 2017-01-31 15:57:18 -08:00
parent f5d2f32d4d
commit 92ec2ea62f
3 changed files with 410 additions and 464 deletions

View File

@ -88,7 +88,7 @@ int main(int argc, char **argv) {
decompressed_size = MAX_COMPRESSION_RATIO * input_size;
fprintf(stderr, "WARNING: Compressed data does contain decompressed "
"size, going to assume the compression ratio is at "
"most %d (decompressed size of at most %lld\n",
"most %d (decompressed size of at most %zu)\n",
MAX_COMPRESSION_RATIO, decompressed_size);
}
output = malloc(decompressed_size);

File diff suppressed because it is too large Load Diff

View File

@ -7,10 +7,10 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
size_t ZSTD_decompress(void *dst, size_t dst_len, const void *src,
size_t src_len);
size_t ZSTD_decompress_with_dict(void *dst, size_t dst_len, const void *src,
size_t src_len, const void *dict,
size_t dict_len);
size_t ZSTD_get_decompressed_size(const void *src, size_t src_len);
size_t ZSTD_decompress(void *const dst, const size_t dst_len,
const void *const src, const size_t src_len);
size_t ZSTD_decompress_with_dict(void *const dst, const size_t dst_len,
const void *const src, const size_t src_len,
const void *const dict, const size_t dict_len);
size_t ZSTD_get_decompressed_size(const void *const src, const size_t src_len);