/external/xz-java/src/org/tukaani/xz/ |
D | LZMAInputStream.java | 88 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 …]
|
D | LZMA2Options.java | 132 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 …]
|
D | LZMA2InputStream.java | 74 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 …]
|
D | LZMA2OutputStream.java | 42 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()
|
D | LZMA2Decoder.java | 15 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()
|
D | LZMAOutputStream.java | 64 int dictSize = options.getDictSize(); in LZMAOutputStream() local 68 dictSize, 0, options.getNiceLen(), in LZMAOutputStream() 81 lz.setPresetDict(dictSize, presetDict); in LZMAOutputStream() 93 out.write(dictSize & 0xFF); in LZMAOutputStream() 94 dictSize >>>= 8; in LZMAOutputStream()
|
/external/xz-java/src/org/tukaani/xz/lz/ |
D | LZEncoder.java | 61 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 …]
|
D | Hash234.java | 33 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()
|
D | HC4.java | 28 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()
|
D | BT4.java | 25 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()
|
D | LZDecoder.java | 28 public LZDecoder(int dictSize, byte[] presetDict, ArrayCache arrayCache) { in LZDecoder() argument 29 bufSize = dictSize; in LZDecoder() 33 pos = Math.min(presetDict.length, dictSize); in LZDecoder()
|
/external/lz4/lib/ |
D | lz4.c | 506 …orceExtDict(const char* in, char* out, int inSize, int outSize, const void* dict, size_t dictSize); 644 cctx->dictSize = 0; in LZ4_prepareTable() 671 const U32 dictSize = in LZ4_compress_generic() local 672 dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; in LZ4_compress_generic() 676 U32 const prefixIdxLimit = startIndex - dictSize; /* used when dictDirective == dictSmall */ in LZ4_compress_generic() 677 const BYTE* const dictEnd = dictionary + dictSize; in LZ4_compress_generic() 686 dictionary + dictSize - dictCtx->currentOffset : in LZ4_compress_generic() 687 dictionary + dictSize - startIndex; in LZ4_compress_generic() 703 lowLimit = (const BYTE*)source - (dictDirective == withPrefix64k ? dictSize : 0); in LZ4_compress_generic() 710 cctx->dictSize = (U32)inputSize; in LZ4_compress_generic() [all …]
|
D | lz4frame.c | 471 LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize) in LZ4F_createCDict() argument 477 if (dictSize > 64 KB) { in LZ4F_createCDict() 478 dictStart += dictSize - 64 KB; in LZ4F_createCDict() 479 dictSize = 64 KB; in LZ4F_createCDict() 481 cdict->dictContent = ALLOC(dictSize); in LZ4F_createCDict() 488 memcpy(cdict->dictContent, dictStart, dictSize); in LZ4F_createCDict() 489 LZ4_loadDict (cdict->fastCtx, (const char*)cdict->dictContent, (int)dictSize); in LZ4F_createCDict() 491 LZ4_loadDictHC(cdict->HCCtx, (const char*)cdict->dictContent, (int)dictSize); in LZ4F_createCDict() 1003 size_t dictSize; member 1048 dctx->dictSize = 0; in LZ4F_resetDecompressionContext() [all …]
|
D | lz4.h | 279 LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize); 336 …t LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize); 387 …ict (const char* src, char* dst, int srcSize, int dstCapcity, const char* dictStart, int dictSize); 388 …fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize); 504 uint32_t dictSize; member 524 unsigned int dictSize; member
|
D | lz4hc.c | 920 int LZ4_loadDictHC (LZ4_streamHC_t* LZ4_streamHCPtr, const char* dictionary, int dictSize) in LZ4_loadDictHC() argument 923 DEBUGLOG(4, "LZ4_loadDictHC(%p, %p, %d)", LZ4_streamHCPtr, dictionary, dictSize); in LZ4_loadDictHC() 924 if (dictSize > 64 KB) { in LZ4_loadDictHC() 925 dictionary += dictSize - 64 KB; in LZ4_loadDictHC() 926 dictSize = 64 KB; in LZ4_loadDictHC() 930 ctxPtr->end = (const BYTE*)dictionary + dictSize; in LZ4_loadDictHC() 931 if (dictSize >= 4) LZ4HC_Insert (ctxPtr, ctxPtr->end-3); in LZ4_loadDictHC() 932 return dictSize; in LZ4_loadDictHC() 968 size_t dictSize = (size_t)(ctxPtr->end - ctxPtr->base) - ctxPtr->dictLimit; in LZ4_compressHC_continue_generic() local 969 if (dictSize > 64 KB) dictSize = 64 KB; in LZ4_compressHC_continue_generic() [all …]
|
/external/lz4/tests/ |
D | fuzzer.c | 366 int const dictSize = MIN(dictSizeRand, blockStart - 1); in FUZ_test() local 369 const char* dict = block - dictSize; in FUZ_test() 642 FUZ_DISPLAYTEST("test LZ4_compress_fast_continue() with dictionary of size %i", dictSize); in FUZ_test() 645 …LZ4_compress_fast_continue (&LZ4_stream, dict, compressedBuffer, dictSize, (int)compressedBufferSi… in FUZ_test() 652 memcpy(decodedBuffer, dict, dictSize); in FUZ_test() 653 …mpress_fast_usingDict(compressedBuffer, decodedBuffer+dictSize, blockSize, decodedBuffer, dictSize… in FUZ_test() 655 { U32 const crcCheck = XXH32(decodedBuffer+dictSize, blockSize, 0); in FUZ_test() 657 …EST(crcCheck!=crcOrig, "LZ4_decompress_fast_usingDict corrupted decoded data (dict %i)", dictSize); in FUZ_test() 661 …ingDict(compressedBuffer, decodedBuffer+dictSize, blockContinueCompressedSize, blockSize, decodedB… in FUZ_test() 663 { U32 const crcCheck = XXH32(decodedBuffer+dictSize, blockSize, 0); in FUZ_test() [all …]
|
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/sevenz/ |
D | LZMADecoder.java | 39 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()
|
D | LZMA2Decoder.java | 55 final int dictSize = getDictSize(opts); in getOptionsAsProperties() local 56 final int lead = Integer.numberOfLeadingZeros(dictSize); in getOptionsAsProperties() 57 final int secondBit = (dictSize >>> (30 - lead)) - 2; in getOptionsAsProperties()
|
/external/xz-java/src/org/tukaani/xz/lzma/ |
D | LZMAEncoderFast.java | 24 static int getMemoryUsage(int dictSize, int extraSizeBefore, int mf) { in getMemoryUsage() argument 26 dictSize, Math.max(extraSizeBefore, EXTRA_SIZE_BEFORE), in getMemoryUsage() 31 int dictSize, int extraSizeBefore, in LZMAEncoderFast() argument 34 super(rc, LZEncoder.getInstance(dictSize, in LZMAEncoderFast() 40 lc, lp, pb, dictSize, niceLen); in LZMAEncoderFast()
|
/external/lz4/examples/ |
D | dictionaryRandomAccess.c | 56 void test_compress(FILE* outFp, FILE* inpFp, void *dict, int dictSize) in test_compress() argument 81 LZ4_loadDict(lz4Stream, dict, dictSize); in test_compress() 105 void test_decompress(FILE* outFp, FILE* inpFp, void *dict, int dictSize, int offset, int length) in test_decompress() argument 156 LZ4_setStreamDecode(lz4StreamDecode, dict, dictSize); in test_decompress() 207 int dictSize; in main() local 231 dictSize = (int)read_bin(dictFp, dict, DICTIONARY_BYTES); in main() 241 test_compress(outFp, inpFp, dict, dictSize); in main()
|
/external/lzma/CPP/7zip/Compress/ |
D | Lzma2Decoder.cpp | 61 static UInt64 Get_ExpectedBlockSize_From_Dict(UInt32 dictSize) in Get_ExpectedBlockSize_From_Dict() argument 65 UInt64 blockSize = (UInt64)dictSize << 2; in Get_ExpectedBlockSize_From_Dict() 68 if (blockSize < dictSize) blockSize = dictSize; in Get_ExpectedBlockSize_From_Dict() 113 UInt32 dictSize = LZMA2_DIC_SIZE_FROM_PROP_FULL(_prop); in Code() local 114 UInt64 expectedBlockSize64 = Get_ExpectedBlockSize_From_Dict(dictSize); in Code()
|
/external/lzma/C/ |
D | LzmaLib.c | 12 unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */ in LzmaCompress() argument 23 props.dictSize = dictSize; in LzmaCompress()
|
D | Lzma86Enc.c | 17 int level, UInt32 dictSize, int filterMode) in Lzma86_Encode() argument 26 props.dictSize = dictSize; in Lzma86_Encode()
|
/external/lzma/CPP/7zip/Bundles/LzmaSpec/ |
D | LzmaSpec.cpp | 78 void Create(UInt32 dictSize) in Create() argument 80 Buf = new Byte[dictSize]; in Create() 82 Size = dictSize; in Create() 325 UInt32 dictSize; member in CLzmaDecoder 340 dictSize = dictSizeInProperties; in DecodeProperties() 341 if (dictSize < LZMA_DIC_MIN) in DecodeProperties() 342 dictSize = LZMA_DIC_MIN; in DecodeProperties() 350 OutWindow.Create(dictSize); in Create() 550 if (rep0 >= dictSize || !OutWindow.CheckDistance(rep0)) in Decode() 638 printf("\nDictionary Size for decoding = %u", lzmaDecoder.dictSize); in main2()
|
/external/u-boot/lib/ |
D | lz4.c | 79 const size_t dictSize /* note : = 0 if noDict */ in LZ4_decompress_generic() argument 90 const BYTE* const lowLimit = lowPrefix - dictSize; in LZ4_decompress_generic() 92 const BYTE* const dictEnd = (const BYTE*)dictStart + dictSize; in LZ4_decompress_generic() 97 const int checkOffset = ((safeDecode) && (dictSize < (int)(64 KB))); in LZ4_decompress_generic()
|