Mercurial > hg
comparison contrib/python-zstandard/zstd/dictBuilder/zdict.c @ 30822:b54a2984cdd4
zstd: vendor python-zstandard 0.6.0
Commit 63c68d6f5fc8de4afd9bde81b13b537beb4e47e8 from
https://github.com/indygreg/python-zstandard is imported without
modifications (other than removing unwanted files).
This includes minor performance and feature improvements. It also
changes the vendored zstd library from 1.1.1 to 1.1.2.
# no-check-commit
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 14 Jan 2017 19:41:43 -0800 |
parents | 2e484bdea8c4 |
children | c32454d69b85 |
comparison
equal
deleted
inserted
replaced
30821:7005c03f7387 | 30822:b54a2984cdd4 |
---|---|
896 /* display best matches */ | 896 /* display best matches */ |
897 if (params.notificationLevel>= 3) { | 897 if (params.notificationLevel>= 3) { |
898 U32 const nb = MIN(25, dictList[0].pos); | 898 U32 const nb = MIN(25, dictList[0].pos); |
899 U32 const dictContentSize = ZDICT_dictSize(dictList); | 899 U32 const dictContentSize = ZDICT_dictSize(dictList); |
900 U32 u; | 900 U32 u; |
901 DISPLAYLEVEL(3, "\n %u segments found, of total size %u \n", dictList[0].pos, dictContentSize); | 901 DISPLAYLEVEL(3, "\n %u segments found, of total size %u \n", dictList[0].pos-1, dictContentSize); |
902 DISPLAYLEVEL(3, "list %u best segments \n", nb); | 902 DISPLAYLEVEL(3, "list %u best segments \n", nb-1); |
903 for (u=1; u<=nb; u++) { | 903 for (u=1; u<nb; u++) { |
904 U32 pos = dictList[u].pos; | 904 U32 const pos = dictList[u].pos; |
905 U32 length = dictList[u].length; | 905 U32 const length = dictList[u].length; |
906 U32 printedLength = MIN(40, length); | 906 U32 const printedLength = MIN(40, length); |
907 if ((pos > samplesBuffSize) || ((pos + length) > samplesBuffSize)) | |
908 return ERROR(GENERIC); /* should never happen */ | |
907 DISPLAYLEVEL(3, "%3u:%3u bytes at pos %8u, savings %7u bytes |", | 909 DISPLAYLEVEL(3, "%3u:%3u bytes at pos %8u, savings %7u bytes |", |
908 u, length, pos, dictList[u].savings); | 910 u, length, pos, dictList[u].savings); |
909 ZDICT_printHex((const char*)samplesBuffer+pos, printedLength); | 911 ZDICT_printHex((const char*)samplesBuffer+pos, printedLength); |
910 DISPLAYLEVEL(3, "| \n"); | 912 DISPLAYLEVEL(3, "| \n"); |
911 } } | 913 } } |