Home
last modified time | relevance | path

Searched refs:dictSize (Results 1 – 25 of 94) sorted by relevance

1234

/external/xz-java/src/org/tukaani/xz/
DLZMAInputStream.java88 public static int getMemoryUsage(int dictSize, byte propsByte) in getMemoryUsage() argument
90 if (dictSize < 0 || dictSize > DICT_SIZE_MAX) in getMemoryUsage()
102 return getMemoryUsage(dictSize, lc, lp); in getMemoryUsage()
121 public static int getMemoryUsage(int dictSize, int lc, int lp) { in getMemoryUsage() argument
132 return 10 + getDictSize(dictSize) / 1024 in getMemoryUsage()
136 private static int getDictSize(int dictSize) { in getDictSize() argument
137 if (dictSize < 0 || dictSize > DICT_SIZE_MAX) in getDictSize()
151 if (dictSize < 4096) in getDictSize()
152 dictSize = 4096; in getDictSize()
156 return (dictSize + 15) & ~15; in getDictSize()
[all …]
DLZMA2Options.java132 private int dictSize; field in LZMA2Options
171 public LZMA2Options(int dictSize, int lc, int lp, int pb, int mode, in LZMA2Options() argument
174 setDictSize(dictSize); in LZMA2Options()
207 dictSize = presetToDictSize[preset]; in setPreset()
237 public void setDictSize(int dictSize) throws UnsupportedOptionsException { in setDictSize() argument
238 if (dictSize < DICT_SIZE_MIN) in setDictSize()
241 + dictSize + " B"); in setDictSize()
243 if (dictSize > DICT_SIZE_MAX) in setDictSize()
246 + (DICT_SIZE_MAX >> 20) + " MiB: " + dictSize + " B"); in setDictSize()
248 this.dictSize = dictSize; in setDictSize()
[all …]
DLZMA2InputStream.java74 public static int getMemoryUsage(int dictSize) { in getMemoryUsage() argument
78 return 40 + COMPRESSED_SIZE_MAX / 1024 + getDictSize(dictSize) / 1024; in getMemoryUsage()
81 private static int getDictSize(int dictSize) { in getDictSize() argument
82 if (dictSize < DICT_SIZE_MIN || dictSize > DICT_SIZE_MAX) in getDictSize()
84 "Unsupported dictionary size " + dictSize); in getDictSize()
90 return (dictSize + 15) & ~15; in getDictSize()
116 public LZMA2InputStream(InputStream in, int dictSize) { in LZMA2InputStream() argument
117 this(in, dictSize, null); in LZMA2InputStream()
138 public LZMA2InputStream(InputStream in, int dictSize, byte[] presetDict) { in LZMA2InputStream() argument
139 this(in, dictSize, presetDict, ArrayCache.getDefaultCache()); in LZMA2InputStream()
[all …]
DLZMA2Decoder.java15 private int dictSize; field in LZMA2Decoder
24 dictSize = 2 | (props[0] & 1); in LZMA2Decoder()
25 dictSize <<= (props[0] >>> 1) + 11; in LZMA2Decoder()
29 return LZMA2InputStream.getMemoryUsage(dictSize); in getMemoryUsage()
33 return new LZMA2InputStream(in, dictSize, null, arrayCache); in getInputStream()
DLZMA2OutputStream.java42 private static int getExtraSizeBefore(int dictSize) { in getExtraSizeBefore() argument
43 return COMPRESSED_SIZE_MAX > dictSize in getExtraSizeBefore()
44 ? COMPRESSED_SIZE_MAX - dictSize : 0; in getExtraSizeBefore()
49 int dictSize = options.getDictSize(); in getMemoryUsage() local
50 int extraSizeBefore = getExtraSizeBefore(dictSize); in getMemoryUsage()
52 dictSize, extraSizeBefore, in getMemoryUsage()
66 int dictSize = options.getDictSize(); in LZMA2OutputStream() local
67 int extraSizeBefore = getExtraSizeBefore(dictSize); in LZMA2OutputStream()
71 dictSize, extraSizeBefore, options.getNiceLen(), in LZMA2OutputStream()
79 lz.setPresetDict(dictSize, presetDict); in LZMA2OutputStream()
/external/zstd/lib/decompress/
Dzstd_ddict.c39 size_t dictSize; member
55 return ddict->dictSize; in ZSTD_DDict_dictSize()
66 dctx->dictEnd = (const BYTE*)ddict->dictContent + ddict->dictSize; in ZSTD_copyDDictParameters()
97 if (ddict->dictSize < 8) { in ZSTD_loadEntropy_intoDDict()
113 &ddict->entropy, ddict->dictContent, ddict->dictSize)), in ZSTD_loadEntropy_intoDDict()
121 const void* dict, size_t dictSize, in ZSTD_initDDict_internal() argument
125 if ((dictLoadMethod == ZSTD_dlm_byRef) || (!dict) || (!dictSize)) { in ZSTD_initDDict_internal()
128 if (!dict) dictSize = 0; in ZSTD_initDDict_internal()
130 void* const internalBuffer = ZSTD_customMalloc(dictSize, ddict->cMem); in ZSTD_initDDict_internal()
134 ZSTD_memcpy(internalBuffer, dict, dictSize); in ZSTD_initDDict_internal()
[all …]
/external/xz-java/src/org/tukaani/xz/lz/
DLZEncoder.java61 int dictSize, int extraSizeBefore, int extraSizeAfter, in getBufSize() argument
63 int keepSizeBefore = extraSizeBefore + dictSize; in getBufSize()
65 int reserveSize = Math.min(dictSize / 2 + (256 << 10), 512 << 20); in getBufSize()
74 int dictSize, int extraSizeBefore, int extraSizeAfter, in getMemoryUsage() argument
77 int m = getBufSize(dictSize, extraSizeBefore, extraSizeAfter, in getMemoryUsage()
82 m += HC4.getMemoryUsage(dictSize); in getMemoryUsage()
86 m += BT4.getMemoryUsage(dictSize); in getMemoryUsage()
121 int dictSize, int extraSizeBefore, int extraSizeAfter, in getInstance() argument
126 return new HC4(dictSize, extraSizeBefore, extraSizeAfter, in getInstance()
130 return new BT4(dictSize, extraSizeBefore, extraSizeAfter, in getInstance()
[all …]
DHash234.java33 static int getHash4Size(int dictSize) { in getHash4Size() argument
34 int h = dictSize - 1; in getHash4Size()
47 static int getMemoryUsage(int dictSize) { in getMemoryUsage() argument
49 return (HASH_2_SIZE + HASH_3_SIZE + getHash4Size(dictSize)) in getMemoryUsage()
53 Hash234(int dictSize, ArrayCache arrayCache) { in Hash234() argument
57 hash4Size = getHash4Size(dictSize); in Hash234()
DHC4.java28 static int getMemoryUsage(int dictSize) { in getMemoryUsage() argument
29 return Hash234.getMemoryUsage(dictSize) + dictSize / (1024 / 4) + 10; in getMemoryUsage()
36 HC4(int dictSize, int beforeSizeMin, int readAheadMax, in HC4() argument
39 super(dictSize, beforeSizeMin, readAheadMax, niceLen, matchLenMax, in HC4()
42 hash = new Hash234(dictSize, arrayCache); in HC4()
45 cyclicSize = dictSize + 1; in HC4()
DBT4.java25 static int getMemoryUsage(int dictSize) { in getMemoryUsage() argument
26 return Hash234.getMemoryUsage(dictSize) + dictSize / (1024 / 8) + 10; in getMemoryUsage()
29 BT4(int dictSize, int beforeSizeMin, int readAheadMax, in BT4() argument
32 super(dictSize, beforeSizeMin, readAheadMax, niceLen, matchLenMax, in BT4()
35 cyclicSize = dictSize + 1; in BT4()
38 hash = new Hash234(dictSize, arrayCache); in BT4()
/external/lz4/ossfuzz/
Ddecompress_frame_fuzzer.c19 const void* dict, size_t dictSize, in decompress() argument
23 if (dictSize == 0) in decompress()
27 dict, dictSize, opts); in decompress()
36 size_t const dictSize = FUZZ_rand32(&seed, 0, largeDictSize); in LLVMFuzzerTestOneInput() local
38 char* const dict = (char*)malloc(dictSize); in LLVMFuzzerTestOneInput()
48 memset(dict, 0, dictSize); in LLVMFuzzerTestOneInput()
58 decompress(dctx, dst, dstCapacity, data, size, dict, dictSize, &opts); in LLVMFuzzerTestOneInput()
60 decompress(dctx, dst, dstCapacity, data, size, dict, dictSize, &opts); in LLVMFuzzerTestOneInput()
Dround_trip_stream_fuzzer.c129 size_t const dictSize = FUZZ_rand32(&state->seed, 0, maxDictSize); in state_trimDict() local
130 DEBUGLOG(2, "dictSize = %zu", dictSize); in state_trimDict()
133 memcpy(state->roundTrip.buf, state->data.buf, dictSize); in state_trimDict()
134 state->data.pos += dictSize; in state_trimDict()
135 state->roundTrip.pos += dictSize; in state_trimDict()
136 return dictSize; in state_trimDict()
191 size_t const dictSize = state_trimDict(state); in state_loadDictRoundTrip() local
192 LZ4_loadDict(state->cstream, dict, dictSize); in state_loadDictRoundTrip()
193 LZ4_setStreamDecode(state->dstream, dict, dictSize); in state_loadDictRoundTrip()
200 size_t const dictSize = state_trimDict(state); in state_attachDictRoundTrip() local
[all …]
Ddecompress_fuzzer.c21 size_t const dictSize = MAX(smallDictSize, largeDictSize); in LLVMFuzzerTestOneInput() local
23 char* const dict = (char*)malloc(dictSize + size); in LLVMFuzzerTestOneInput()
25 char* const dataAfterDict = dict + dictSize; in LLVMFuzzerTestOneInput()
32 memset(dict, 0, dictSize); in LLVMFuzzerTestOneInput()
/external/zstd/tests/fuzz/
Dsequence_compression_api.c72 size_t literalsSize, const void* dict, size_t dictSize) { in decodeSequences() argument
100 if (dictSize != 0) { in decodeSequences()
105 op[k] = dictPtr[dictSize - offsetFromEndOfDict + k]; in decodeSequences()
133 size_t literalsSizeLimit, size_t dictSize, in generateRandomSequences() argument
150 …litLength = isFirstSequence && dictSize == 0 ? FUZZ_dataProducer_uint32Range(producer, 1, literals… in generateRandomSequences()
156 offsetBound = bytesGenerated > windowSize ? windowSize : bytesGenerated + dictSize; in generateRandomSequences()
158 if (dictSize > 0 && bytesGenerated <= windowSize) { in generateRandomSequences()
188 const void *dict, size_t dictSize, in roundTripTest() argument
206 FUZZ_ZASSERT(ZSTD_CCtx_loadDictionary(cctx, dict, dictSize)); in roundTripTest()
207 FUZZ_ZASSERT(ZSTD_DCtx_loadDictionary(dctx, dict, dictSize)); in roundTripTest()
[all …]
Draw_dictionary_round_trip.c31 const void *dict, size_t dictSize, in roundTripTest() argument
43 cctx, dict, dictSize, in roundTripTest()
47 cctx, dict, dictSize, in roundTripTest()
55 dctx, dict, dictSize, in roundTripTest()
59 dctx, dict, dictSize, in roundTripTest()
79 size_t const dictSize = size - srcSize; in LLVMFuzzerTestOneInput() local
102 …ndTripTest(decompBuf, decompSize, compBuf, compSize, srcBuf, srcSize, dictBuf, dictSize, producer); in LLVMFuzzerTestOneInput()
Ddictionary_loader.c29 void const* dict, size_t dictSize, in compress() argument
37 cctx, dict, dictSize, dictContentType)); in compress()
40 cctx, dict, dictSize, dictLoadMethod, dictContentType)); in compress()
49 void const* dict, size_t dictSize, in decompress() argument
57 dctx, dict, dictSize, dictContentType)); in decompress()
60 dctx, dict, dictSize, dictLoadMethod, dictContentType)); in decompress()
/external/lz4/lib/
Dlz4.c622 const void* dictStart, size_t dictSize);
784 cctx->dictSize = 0; in LZ4_prepareTable()
812 const U32 dictSize = in LZ4_compress_generic() local
813 dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; in LZ4_compress_generic()
817 U32 const prefixIdxLimit = startIndex - dictSize; /* used when dictDirective == dictSmall */ in LZ4_compress_generic()
818 const BYTE* const dictEnd = dictionary + dictSize; in LZ4_compress_generic()
827 dictionary + dictSize - dictCtx->currentOffset : in LZ4_compress_generic()
828 dictionary + dictSize - startIndex; in LZ4_compress_generic()
845 lowLimit = (const BYTE*)source - (dictDirective == withPrefix64k ? dictSize : 0); in LZ4_compress_generic()
852 cctx->dictSize = (U32)inputSize; in LZ4_compress_generic()
[all …]
Dlz4frame.c490 LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize) in LZ4F_createCDict() argument
496 if (dictSize > 64 KB) { in LZ4F_createCDict()
497 dictStart += dictSize - 64 KB; in LZ4F_createCDict()
498 dictSize = 64 KB; in LZ4F_createCDict()
500 cdict->dictContent = ALLOC(dictSize); in LZ4F_createCDict()
507 memcpy(cdict->dictContent, dictStart, dictSize); in LZ4F_createCDict()
508 LZ4_loadDict (cdict->fastCtx, (const char*)cdict->dictContent, (int)dictSize); in LZ4F_createCDict()
510 LZ4_loadDictHC(cdict->HCCtx, (const char*)cdict->dictContent, (int)dictSize); in LZ4F_createCDict()
1049 size_t dictSize; member
1097 dctx->dictSize = 0; in LZ4F_resetDecompressionContext()
[all …]
/external/zstd/lib/
Dzstd.h819 const void* dict,size_t dictSize,
831 const void* dict,size_t dictSize);
851 ZSTDLIB_API ZSTD_CDict* ZSTD_createCDict(const void* dictBuffer, size_t dictSize,
874 ZSTDLIB_API ZSTD_DDict* ZSTD_createDDict(const void* dictBuffer, size_t dictSize);
897 ZSTDLIB_API unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize);
945 ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
997 ZSTDLIB_API size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize);
1431 ZSTDLIB_API size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel);
1432 ZSTDLIB_API size_t ZSTD_estimateCDictSize_advanced(size_t dictSize, ZSTD_compressionParameters cPar…
1433 ZSTDLIB_API size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod);
[all …]
/external/zstd/tests/
Dfuzzer.c777 size_t const dictSize = kWindowSize * 10; in basicUnitTests() local
781 if (CNBuffSize < dictSize) goto _output_error; in basicUnitTests()
783 RDG_genBuffer(dict, dictSize, 0.5, 0.5, seed); in basicUnitTests()
798 CHECK_Z(ZSTD_CCtx_refPrefix(cctx, dict, dictSize)); in basicUnitTests()
801 …TD_decompress_usingDict(dctx, decodedBuffer, CNBuffSize, compressedBuffer, cSize, dict, dictSize)); in basicUnitTests()
814 CHECK_Z(ZSTD_CCtx_refPrefix(cctx, dict, dictSize)); in basicUnitTests()
822 …TD_decompress_usingDict(dctx, decodedBuffer, CNBuffSize, compressedBuffer, cSize, dict, dictSize)); in basicUnitTests()
1614 static const size_t dictSize = 551; in basicUnitTests() local
1623 CHECK( ZSTD_compressBegin_usingDict(ctxOrig, CNBuffer, dictSize, 2) ); in basicUnitTests()
1631 (const char*)CNBuffer + dictSize, CNBuffSize - dictSize), in basicUnitTests()
[all …]
/external/zstd/programs/
Ddibio.c319 { size_t dictSize; in DiB_trainFromFiles() local
322 dictSize = ZDICT_trainFromBuffer_unsafe_legacy(dictBuffer, maxDictSize, in DiB_trainFromFiles()
327 dictSize = ZDICT_optimizeTrainFromBuffer_cover(dictBuffer, maxDictSize, in DiB_trainFromFiles()
330 if (!ZDICT_isError(dictSize)) { in DiB_trainFromFiles()
336 dictSize = ZDICT_trainFromBuffer_cover(dictBuffer, maxDictSize, srcBuffer, in DiB_trainFromFiles()
342 dictSize = ZDICT_optimizeTrainFromBuffer_fastCover(dictBuffer, maxDictSize, in DiB_trainFromFiles()
345 if (!ZDICT_isError(dictSize)) { in DiB_trainFromFiles()
352 dictSize = ZDICT_trainFromBuffer_fastCover(dictBuffer, maxDictSize, srcBuffer, in DiB_trainFromFiles()
356 if (ZDICT_isError(dictSize)) { in DiB_trainFromFiles()
357 …DISPLAYLEVEL(1, "dictionary training failed : %s \n", ZDICT_getErrorName(dictSize)); /* should n… in DiB_trainFromFiles()
[all …]
/external/zstd/lib/legacy/
Dzstd_legacy.h124 const void* dict,size_t dictSize) in ZSTD_decompressLegacy() argument
127 …(void)dst; (void)dstCapacity; (void)dict; (void)dictSize; /* unused when ZSTD_LEGACY_SUPPORT >= 8… in ZSTD_decompressLegacy()
151 … result = ZSTDv05_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); in ZSTD_decompressLegacy()
161 … result = ZSTDv06_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); in ZSTD_decompressLegacy()
171 … result = ZSTDv07_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); in ZSTD_decompressLegacy()
281 const void* dict, size_t dictSize) in ZSTD_initLegacyStream() argument
291 (void)dict; (void)dictSize; in ZSTD_initLegacyStream()
299 ZBUFFv04_decompressWithDictionary(dctx, dict, dictSize); in ZSTD_initLegacyStream()
309 ZBUFFv05_decompressInitDictionary(dctx, dict, dictSize); in ZSTD_initLegacyStream()
319 ZBUFFv06_decompressInitDictionary(dctx, dict, dictSize); in ZSTD_initLegacyStream()
[all …]
/external/zstd/lib/compress/
Dzstd_compress.c144 size_t const bufferSize = dict.dictBuffer != NULL ? dict.dictSize : 0; in ZSTD_sizeof_localDict()
955 size_t const dictSize);
973 assert(dl->dictSize == 0); in ZSTD_initLocalDict()
981 assert(dl->dictSize > 0); in ZSTD_initLocalDict()
987 dl->dictSize, in ZSTD_initLocalDict()
998 ZSTD_CCtx* cctx, const void* dict, size_t dictSize, in ZSTD_CCtx_loadDictionary_advanced() argument
1003 DEBUGLOG(4, "ZSTD_CCtx_loadDictionary_advanced (size: %u)", (U32)dictSize); in ZSTD_CCtx_loadDictionary_advanced()
1005 if (dict == NULL || dictSize == 0) /* no dictionary mode */ in ZSTD_CCtx_loadDictionary_advanced()
1013 dictBuffer = ZSTD_customMalloc(dictSize, cctx->customMem); in ZSTD_CCtx_loadDictionary_advanced()
1015 ZSTD_memcpy(dictBuffer, dict, dictSize); in ZSTD_CCtx_loadDictionary_advanced()
[all …]
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/sevenz/
DLZMADecoder.java39 final int dictSize = getDictionarySize(coder); in decode() local
40 if (dictSize > LZMAInputStream.DICT_SIZE_MAX) { in decode()
43 return new LZMAInputStream(in, uncompressedLength, propsByte, dictSize); in decode()
58 int dictSize = options.getDictSize(); in getOptionsAsProperties() local
61 ByteUtils.toLittleEndian(o, dictSize, 1, 4); in getOptionsAsProperties()
/external/lz4/tests/
Dfuzzer.c379 int const dictSize = MIN(dictSizeRand, blockStart - 1); in FUZ_test() local
382 const char* dict = block - dictSize; in FUZ_test()
682 FUZ_DISPLAYTEST("test LZ4_compress_fast_continue() with dictionary of size %i", dictSize); in FUZ_test()
685 …LZ4_compress_fast_continue (&LZ4_stream, dict, compressedBuffer, dictSize, (int)compressedBufferSi… in FUZ_test()
692 memcpy(decodedBuffer, dict, dictSize); in FUZ_test()
693 …mpress_fast_usingDict(compressedBuffer, decodedBuffer+dictSize, blockSize, decodedBuffer, dictSize in FUZ_test()
695 { U32 const crcCheck = XXH32(decodedBuffer+dictSize, (size_t)blockSize, 0); in FUZ_test()
698 … EXIT_MSG("LZ4_decompress_fast_usingDict corrupted decoded data (dict %i)", dictSize); in FUZ_test()
702 …ingDict(compressedBuffer, decodedBuffer+dictSize, blockContinueCompressedSize, blockSize, decodedB… in FUZ_test()
704 { U32 const crcCheck = XXH32(decodedBuffer+dictSize, (size_t)blockSize, 0); in FUZ_test()
[all …]

1234