diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BUILD b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BUILD deleted file mode 100644 index e6d3a4d..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -# Description: -# Java port of Brotli decoder. - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) # MIT - -java_library( - name = "dec", - srcs = glob( - ["*.java"], - exclude = ["*Test*.java"], - ), - proguard_specs = ["proguard.cfg"], -) - -java_library( - name = "test_lib", - testonly = 1, - srcs = glob(["*Test*.java"]), - deps = [ - ":dec", - "@junit_junit//jar", - ], -) - -java_test( - name = "BitReaderTest", - test_class = "org.brotli.dec.BitReaderTest", - runtime_deps = [":test_lib"], -) - -java_test( - name = "DecodeTest", - test_class = "org.brotli.dec.DecodeTest", - runtime_deps = [":test_lib"], -) - -java_test( - name = "DictionaryTest", - test_class = "org.brotli.dec.DictionaryTest", - runtime_deps = [":test_lib"], -) - -java_test( - name = "EagerStreamTest", - test_class = "org.brotli.dec.EagerStreamTest", - runtime_deps = [":test_lib"], -) - -java_test( - name = "SynthTest", - test_class = "org.brotli.dec.SynthTest", - runtime_deps = [":test_lib"], -) - -java_test( - name = "TransformTest", - test_class = "org.brotli.dec.TransformTest", - runtime_deps = [":test_lib"], -) diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BitReader.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BitReader.java deleted file mode 100644 index 5d54e01..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BitReader.java +++ /dev/null @@ -1,266 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -/** - * Bit reading helpers. - */ -final class BitReader { - - // Possible values: {5, 6}. 5 corresponds to 32-bit build, 6 to 64-bit. This value is used for - // conditional compilation -> produced artifacts might be binary INCOMPATIBLE (JLS 13.2). - private static final int LOG_BITNESS = 6; - private static final int BITNESS = 1 << LOG_BITNESS; - - private static final int BYTENESS = BITNESS / 8; - private static final int CAPACITY = 4096; - // After encountering the end of the input stream, this amount of zero bytes will be appended. - private static final int SLACK = 64; - private static final int BUFFER_SIZE = CAPACITY + SLACK; - // Don't bother to replenish the buffer while this number of bytes is available. - private static final int SAFEGUARD = 36; - private static final int WATERLINE = CAPACITY - SAFEGUARD; - - // "Half" refers to "half of native integer type", i.e. on 64-bit machines it is 32-bit type, - // on 32-bit machines it is 16-bit. - private static final int HALF_BITNESS = BITNESS / 2; - private static final int HALF_SIZE = BYTENESS / 2; - private static final int HALVES_CAPACITY = CAPACITY / HALF_SIZE; - private static final int HALF_BUFFER_SIZE = BUFFER_SIZE / HALF_SIZE; - private static final int HALF_WATERLINE = WATERLINE / HALF_SIZE; - - private static final int LOG_HALF_SIZE = LOG_BITNESS - 4; - - /** - * Fills up the input buffer. - * - *
No-op if there are at least 36 bytes present after current position. - * - *
After encountering the end of the input stream, 64 additional zero bytes are copied to the - * buffer. - */ - static void readMoreInput(State s) { - if (s.halfOffset > HALF_WATERLINE) { - doReadMoreInput(s); - } - } - - static void doReadMoreInput(State s) { - if (s.endOfStreamReached != 0) { - if (halfAvailable(s) >= -2) { - return; - } - throw new BrotliRuntimeException("No more input"); - } - int readOffset = s.halfOffset << LOG_HALF_SIZE; - int bytesInBuffer = CAPACITY - readOffset; - // Move unused bytes to the head of the buffer. - Utils.copyBytesWithin(s.byteBuffer, 0, readOffset, CAPACITY); - s.halfOffset = 0; - while (bytesInBuffer < CAPACITY) { - int spaceLeft = CAPACITY - bytesInBuffer; - int len = Utils.readInput(s.input, s.byteBuffer, bytesInBuffer, spaceLeft); - // EOF is -1 in Java, but 0 in C#. - if (len <= 0) { - s.endOfStreamReached = 1; - s.tailBytes = bytesInBuffer; - bytesInBuffer += HALF_SIZE - 1; - break; - } - bytesInBuffer += len; - } - bytesToNibbles(s, bytesInBuffer); - } - - static void checkHealth(State s, int endOfStream) { - if (s.endOfStreamReached == 0) { - return; - } - int byteOffset = (s.halfOffset << LOG_HALF_SIZE) + ((s.bitOffset + 7) >> 3) - BYTENESS; - if (byteOffset > s.tailBytes) { - throw new BrotliRuntimeException("Read after end"); - } - if ((endOfStream != 0) && (byteOffset != s.tailBytes)) { - throw new BrotliRuntimeException("Unused bytes after end"); - } - } - - static void fillBitWindow(State s) { - if (s.bitOffset >= HALF_BITNESS) { - // Same as doFillBitWindow. JVM fails to inline it. - if (BITNESS == 64) { - s.accumulator64 = ((long) s.intBuffer[s.halfOffset++] << HALF_BITNESS) - | (s.accumulator64 >>> HALF_BITNESS); - } else { - s.accumulator32 = ((int) s.shortBuffer[s.halfOffset++] << HALF_BITNESS) - | (s.accumulator32 >>> HALF_BITNESS); - } - s.bitOffset -= HALF_BITNESS; - } - } - - private static void doFillBitWindow(State s) { - if (BITNESS == 64) { - s.accumulator64 = ((long) s.intBuffer[s.halfOffset++] << HALF_BITNESS) - | (s.accumulator64 >>> HALF_BITNESS); - } else { - s.accumulator32 = ((int) s.shortBuffer[s.halfOffset++] << HALF_BITNESS) - | (s.accumulator32 >>> HALF_BITNESS); - } - s.bitOffset -= HALF_BITNESS; - } - - static int peekBits(State s) { - if (BITNESS == 64) { - return (int) (s.accumulator64 >>> s.bitOffset); - } else { - return s.accumulator32 >>> s.bitOffset; - } - } - - static int readFewBits(State s, int n) { - int val = peekBits(s) & ((1 << n) - 1); - s.bitOffset += n; - return val; - } - - static int readBits(State s, int n) { - if (HALF_BITNESS >= 24) { - return readFewBits(s, n); - } else { - return (n <= 16) ? readFewBits(s, n) : readManyBits(s, n); - } - } - - private static int readManyBits(State s, int n) { - int low = readFewBits(s, 16); - doFillBitWindow(s); - return low | (readFewBits(s, n - 16) << 16); - } - - static void initBitReader(State s) { - s.byteBuffer = new byte[BUFFER_SIZE]; - if (BITNESS == 64) { - s.accumulator64 = 0; - s.intBuffer = new int[HALF_BUFFER_SIZE]; - } else { - s.accumulator32 = 0; - s.shortBuffer = new short[HALF_BUFFER_SIZE]; - } - s.bitOffset = BITNESS; - s.halfOffset = HALVES_CAPACITY; - s.endOfStreamReached = 0; - prepare(s); - } - - private static void prepare(State s) { - readMoreInput(s); - checkHealth(s, 0); - doFillBitWindow(s); - doFillBitWindow(s); - } - - static void reload(State s) { - if (s.bitOffset == BITNESS) { - prepare(s); - } - } - - static void jumpToByteBoundary(State s) { - int padding = (BITNESS - s.bitOffset) & 7; - if (padding != 0) { - int paddingBits = readFewBits(s, padding); - if (paddingBits != 0) { - throw new BrotliRuntimeException("Corrupted padding bits"); - } - } - } - - static int halfAvailable(State s) { - int limit = HALVES_CAPACITY; - if (s.endOfStreamReached != 0) { - limit = (s.tailBytes + (HALF_SIZE - 1)) >> LOG_HALF_SIZE; - } - return limit - s.halfOffset; - } - - static void copyBytes(State s, byte[] data, int offset, int length) { - if ((s.bitOffset & 7) != 0) { - throw new BrotliRuntimeException("Unaligned copyBytes"); - } - - // Drain accumulator. - while ((s.bitOffset != BITNESS) && (length != 0)) { - data[offset++] = (byte) peekBits(s); - s.bitOffset += 8; - length--; - } - if (length == 0) { - return; - } - - // Get data from shadow buffer with "sizeof(int)" granularity. - int copyNibbles = Math.min(halfAvailable(s), length >> LOG_HALF_SIZE); - if (copyNibbles > 0) { - int readOffset = s.halfOffset << LOG_HALF_SIZE; - int delta = copyNibbles << LOG_HALF_SIZE; - System.arraycopy(s.byteBuffer, readOffset, data, offset, delta); - offset += delta; - length -= delta; - s.halfOffset += copyNibbles; - } - if (length == 0) { - return; - } - - // Read tail bytes. - if (halfAvailable(s) > 0) { - // length = 1..3 - fillBitWindow(s); - while (length != 0) { - data[offset++] = (byte) peekBits(s); - s.bitOffset += 8; - length--; - } - checkHealth(s, 0); - return; - } - - // Now it is possible to copy bytes directly. - while (length > 0) { - int len = Utils.readInput(s.input, data, offset, length); - if (len == -1) { - throw new BrotliRuntimeException("Unexpected end of input"); - } - offset += len; - length -= len; - } - } - - /** - * Translates bytes to halves (int/short). - */ - static void bytesToNibbles(State s, int byteLen) { - byte[] byteBuffer = s.byteBuffer; - int halfLen = byteLen >> LOG_HALF_SIZE; - if (BITNESS == 64) { - int[] intBuffer = s.intBuffer; - for (int i = 0; i < halfLen; ++i) { - intBuffer[i] = ((byteBuffer[i * 4] & 0xFF)) - | ((byteBuffer[(i * 4) + 1] & 0xFF) << 8) - | ((byteBuffer[(i * 4) + 2] & 0xFF) << 16) - | ((byteBuffer[(i * 4) + 3] & 0xFF) << 24); - } - } else { - short[] shortBuffer = s.shortBuffer; - for (int i = 0; i < halfLen; ++i) { - shortBuffer[i] = (short) ((byteBuffer[i * 2] & 0xFF) - | ((byteBuffer[(i * 2) + 1] & 0xFF) << 8)); - } - } - } -} diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BitReaderTest.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BitReaderTest.java deleted file mode 100644 index fa57640..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BitReaderTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -import static org.junit.Assert.fail; - -import java.io.ByteArrayInputStream; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** - * Tests for {@link BitReader}. - */ -@RunWith(JUnit4.class) -public class BitReaderTest { - - @Test - public void testReadAfterEos() { - State reader = new State(); - Decode.initState(reader, new ByteArrayInputStream(new byte[1])); - BitReader.readBits(reader, 9); - try { - BitReader.checkHealth(reader, 0); - } catch (BrotliRuntimeException ex) { - // This exception is expected. - return; - } - fail("BrotliRuntimeException should have been thrown by BitReader.checkHealth"); - } -} diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BrotliInputStream.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BrotliInputStream.java deleted file mode 100644 index a27e928..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BrotliInputStream.java +++ /dev/null @@ -1,156 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -import java.io.IOException; -import java.io.InputStream; - -/** - * {@link InputStream} decorator that decompresses brotli data. - * - *
Not thread-safe. - */ -public class BrotliInputStream extends InputStream { - - public static final int DEFAULT_INTERNAL_BUFFER_SIZE = 256; - - /** - * Internal buffer used for efficient byte-by-byte reading. - */ - private byte[] buffer; - - /** - * Number of decoded but still unused bytes in internal buffer. - */ - private int remainingBufferBytes; - - /** - * Next unused byte offset. - */ - private int bufferOffset; - - /** - * Decoder state. - */ - private final State state = new State(); - - /** - * Creates a {@link InputStream} wrapper that decompresses brotli data. - * - *
For byte-by-byte reading ({@link #read()}) internal buffer with - * {@link #DEFAULT_INTERNAL_BUFFER_SIZE} size is allocated and used. - * - *
Will block the thread until first {@link BitReader#CAPACITY} bytes of data of source - * are available. - * - * @param source underlying data source - * @throws IOException in case of corrupted data or source stream problems - */ - public BrotliInputStream(InputStream source) throws IOException { - this(source, DEFAULT_INTERNAL_BUFFER_SIZE); - } - - /** - * Creates a {@link InputStream} wrapper that decompresses brotli data. - * - *
For byte-by-byte reading ({@link #read()}) internal buffer of specified size is - * allocated and used. - * - *
Will block the thread until first {@link BitReader#CAPACITY} bytes of data of source - * are available. - * - * @param source compressed data source - * @param byteReadBufferSize size of internal buffer used in case of - * byte-by-byte reading - * @throws IOException in case of corrupted data or source stream problems - */ - public BrotliInputStream(InputStream source, int byteReadBufferSize) throws IOException { - if (byteReadBufferSize <= 0) { - throw new IllegalArgumentException("Bad buffer size:" + byteReadBufferSize); - } else if (source == null) { - throw new IllegalArgumentException("source is null"); - } - this.buffer = new byte[byteReadBufferSize]; - this.remainingBufferBytes = 0; - this.bufferOffset = 0; - try { - Decode.initState(state, source); - } catch (BrotliRuntimeException ex) { - throw new IOException("Brotli decoder initialization failed", ex); - } - } - - public void setEager(boolean eager) { - state.isEager = eager ? 1 : 0; - } - - /** - * {@inheritDoc} - */ - @Override - public void close() throws IOException { - Decode.close(state); - } - - /** - * {@inheritDoc} - */ - @Override - public int read() throws IOException { - if (bufferOffset >= remainingBufferBytes) { - remainingBufferBytes = read(buffer, 0, buffer.length); - bufferOffset = 0; - if (remainingBufferBytes == -1) { - return -1; - } - } - return buffer[bufferOffset++] & 0xFF; - } - - /** - * {@inheritDoc} - */ - @Override - public int read(byte[] destBuffer, int destOffset, int destLen) throws IOException { - if (destOffset < 0) { - throw new IllegalArgumentException("Bad offset: " + destOffset); - } else if (destLen < 0) { - throw new IllegalArgumentException("Bad length: " + destLen); - } else if (destOffset + destLen > destBuffer.length) { - throw new IllegalArgumentException( - "Buffer overflow: " + (destOffset + destLen) + " > " + destBuffer.length); - } else if (destLen == 0) { - return 0; - } - int copyLen = Math.max(remainingBufferBytes - bufferOffset, 0); - if (copyLen != 0) { - copyLen = Math.min(copyLen, destLen); - System.arraycopy(buffer, bufferOffset, destBuffer, destOffset, copyLen); - bufferOffset += copyLen; - destOffset += copyLen; - destLen -= copyLen; - if (destLen == 0) { - return copyLen; - } - } - try { - state.output = destBuffer; - state.outputOffset = destOffset; - state.outputLength = destLen; - state.outputUsed = 0; - Decode.decompress(state); - if (state.outputUsed == 0) { - return -1; - } - return state.outputUsed + copyLen; - } catch (BrotliRuntimeException ex) { - throw new IOException("Brotli stream decoding failed", ex); - } - - // <{[INJECTED CODE]}> - } -} diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BrotliRuntimeException.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BrotliRuntimeException.java deleted file mode 100644 index 1844907..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/BrotliRuntimeException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -/** - * Unchecked exception used internally. - */ -class BrotliRuntimeException extends RuntimeException { - - BrotliRuntimeException(String message) { - super(message); - } - - BrotliRuntimeException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Context.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Context.java deleted file mode 100644 index d9f3f91..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Context.java +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -/** - * Common context lookup table for all context modes. - */ -final class Context { - - static final int[] LOOKUP = new int[2048]; - - private static final String UTF_MAP = " !! ! \"#$##%#$&'##(#)#+++++++++" - + "+((&*'##,---,---,-----,-----,-----'###.///.///./////./////./////'# "; - private static final String UTF_RLE = "A/* ': & : $ \u0081 @"; - - private static void unpackLookupTable(int[] lookup, String map, String rle) { - // LSB6, MSB6, SIGNED - for (int i = 0; i < 256; ++i) { - lookup[i] = i & 0x3F; - lookup[512 + i] = i >> 2; - lookup[1792 + i] = 2 + (i >> 6); - } - // UTF8 - for (int i = 0; i < 128; ++i) { - lookup[1024 + i] = 4 * (map.charAt(i) - 32); - } - for (int i = 0; i < 64; ++i) { - lookup[1152 + i] = i & 1; - lookup[1216 + i] = 2 + (i & 1); - } - int offset = 1280; - for (int k = 0; k < 19; ++k) { - int value = k & 3; - int rep = rle.charAt(k) - 32; - for (int i = 0; i < rep; ++i) { - lookup[offset++] = value; - } - } - // SIGNED - for (int i = 0; i < 16; ++i) { - lookup[1792 + i] = 1; - lookup[2032 + i] = 6; - } - lookup[1792] = 0; - lookup[2047] = 7; - for (int i = 0; i < 256; ++i) { - lookup[1536 + i] = lookup[1792 + i] << 3; - } - } - - static { - unpackLookupTable(LOOKUP, UTF_MAP, UTF_RLE); - } -} diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Decode.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Decode.java deleted file mode 100644 index 9e3d43b..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Decode.java +++ /dev/null @@ -1,1008 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -import java.io.IOException; -import java.io.InputStream; - -/** - * API for Brotli decompression. - */ -final class Decode { - - //---------------------------------------------------------------------------- - // RunningState - //---------------------------------------------------------------------------- - private static final int UNINITIALIZED = 0; - private static final int BLOCK_START = 1; - private static final int COMPRESSED_BLOCK_START = 2; - private static final int MAIN_LOOP = 3; - private static final int READ_METADATA = 4; - private static final int COPY_UNCOMPRESSED = 5; - private static final int INSERT_LOOP = 6; - private static final int COPY_LOOP = 7; - private static final int TRANSFORM = 8; - private static final int FINISHED = 9; - private static final int CLOSED = 10; - private static final int INIT_WRITE = 11; - private static final int WRITE = 12; - - private static final int DEFAULT_CODE_LENGTH = 8; - private static final int CODE_LENGTH_REPEAT_CODE = 16; - private static final int NUM_LITERAL_CODES = 256; - private static final int NUM_INSERT_AND_COPY_CODES = 704; - private static final int NUM_BLOCK_LENGTH_CODES = 26; - private static final int LITERAL_CONTEXT_BITS = 6; - private static final int DISTANCE_CONTEXT_BITS = 2; - - private static final int HUFFMAN_TABLE_BITS = 8; - private static final int HUFFMAN_TABLE_MASK = 0xFF; - - /** - * Maximum possible Huffman table size for an alphabet size of 704, max code length 15 and root - * table bits 8. - */ - static final int HUFFMAN_TABLE_SIZE = 1080; - - private static final int CODE_LENGTH_CODES = 18; - private static final int[] CODE_LENGTH_CODE_ORDER = { - 1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, - }; - - private static final int NUM_DISTANCE_SHORT_CODES = 16; - private static final int[] DISTANCE_SHORT_CODE_INDEX_OFFSET = { - 3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 - }; - - private static final int[] DISTANCE_SHORT_CODE_VALUE_OFFSET = { - 0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3 - }; - - /** - * Static Huffman code for the code length code lengths. - */ - private static final int[] FIXED_TABLE = { - 0x020000, 0x020004, 0x020003, 0x030002, 0x020000, 0x020004, 0x020003, 0x040001, - 0x020000, 0x020004, 0x020003, 0x030002, 0x020000, 0x020004, 0x020003, 0x040005 - }; - - static final int[] DICTIONARY_OFFSETS_BY_LENGTH = { - 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, 53248, 63488, 74752, 87040, 93696, 100864, - 104704, 106752, 108928, 113536, 115968, 118528, 119872, 121280, 122016 - }; - - static final int[] DICTIONARY_SIZE_BITS_BY_LENGTH = { - 0, 0, 0, 0, 10, 10, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 7, 7, 8, 7, 7, 6, 6, 5, 5 - }; - - static final int MIN_WORD_LENGTH = 4; - - static final int MAX_WORD_LENGTH = 24; - - static final int MAX_TRANSFORMED_WORD_LENGTH = 5 + MAX_WORD_LENGTH + 8; - - //---------------------------------------------------------------------------- - // Prefix code LUT. - //---------------------------------------------------------------------------- - static final int[] BLOCK_LENGTH_OFFSET = { - 1, 5, 9, 13, 17, 25, 33, 41, 49, 65, 81, 97, 113, 145, 177, 209, 241, 305, 369, 497, - 753, 1265, 2289, 4337, 8433, 16625 - }; - - static final int[] BLOCK_LENGTH_N_BITS = { - 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13, 24 - }; - - static final int[] INSERT_LENGTH_OFFSET = { - 0, 1, 2, 3, 4, 5, 6, 8, 10, 14, 18, 26, 34, 50, 66, 98, 130, 194, 322, 578, 1090, 2114, 6210, - 22594 - }; - - static final int[] INSERT_LENGTH_N_BITS = { - 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 12, 14, 24 - }; - - static final int[] COPY_LENGTH_OFFSET = { - 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 18, 22, 30, 38, 54, 70, 102, 134, 198, 326, 582, 1094, - 2118 - }; - - static final int[] COPY_LENGTH_N_BITS = { - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 24 - }; - - static final int[] INSERT_RANGE_LUT = { - 0, 0, 8, 8, 0, 16, 8, 16, 16 - }; - - static final int[] COPY_RANGE_LUT = { - 0, 8, 0, 8, 16, 0, 16, 8, 16 - }; - - private static int decodeWindowBits(State s) { - BitReader.fillBitWindow(s); - if (BitReader.readFewBits(s, 1) == 0) { - return 16; - } - int n = BitReader.readFewBits(s, 3); - if (n != 0) { - return 17 + n; - } - n = BitReader.readFewBits(s, 3); - if (n != 0) { - return 8 + n; - } - return 17; - } - - /** - * Associate input with decoder state. - * - * @param s uninitialized state without associated input - * @param input compressed data source - */ - static void initState(State s, InputStream input) { - if (s.runningState != UNINITIALIZED) { - throw new IllegalStateException("State MUST be uninitialized"); - } - s.blockTrees = new int[6 * HUFFMAN_TABLE_SIZE]; - s.input = input; - BitReader.initBitReader(s); - int windowBits = decodeWindowBits(s); - if (windowBits == 9) { /* Reserved case for future expansion. */ - throw new BrotliRuntimeException("Invalid 'windowBits' code"); - } - s.maxRingBufferSize = 1 << windowBits; - s.maxBackwardDistance = s.maxRingBufferSize - 16; - s.runningState = BLOCK_START; - } - - static void close(State s) throws IOException { - if (s.runningState == UNINITIALIZED) { - throw new IllegalStateException("State MUST be initialized"); - } - if (s.runningState == CLOSED) { - return; - } - s.runningState = CLOSED; - if (s.input != null) { - Utils.closeInput(s.input); - s.input = null; - } - } - - /** - * Decodes a number in the range [0..255], by reading 1 - 11 bits. - */ - private static int decodeVarLenUnsignedByte(State s) { - BitReader.fillBitWindow(s); - if (BitReader.readFewBits(s, 1) != 0) { - int n = BitReader.readFewBits(s, 3); - if (n == 0) { - return 1; - } else { - return BitReader.readFewBits(s, n) + (1 << n); - } - } - return 0; - } - - private static void decodeMetaBlockLength(State s) { - BitReader.fillBitWindow(s); - s.inputEnd = BitReader.readFewBits(s, 1); - s.metaBlockLength = 0; - s.isUncompressed = 0; - s.isMetadata = 0; - if ((s.inputEnd != 0) && BitReader.readFewBits(s, 1) != 0) { - return; - } - int sizeNibbles = BitReader.readFewBits(s, 2) + 4; - if (sizeNibbles == 7) { - s.isMetadata = 1; - if (BitReader.readFewBits(s, 1) != 0) { - throw new BrotliRuntimeException("Corrupted reserved bit"); - } - int sizeBytes = BitReader.readFewBits(s, 2); - if (sizeBytes == 0) { - return; - } - for (int i = 0; i < sizeBytes; i++) { - BitReader.fillBitWindow(s); - int bits = BitReader.readFewBits(s, 8); - if (bits == 0 && i + 1 == sizeBytes && sizeBytes > 1) { - throw new BrotliRuntimeException("Exuberant nibble"); - } - s.metaBlockLength |= bits << (i * 8); - } - } else { - for (int i = 0; i < sizeNibbles; i++) { - BitReader.fillBitWindow(s); - int bits = BitReader.readFewBits(s, 4); - if (bits == 0 && i + 1 == sizeNibbles && sizeNibbles > 4) { - throw new BrotliRuntimeException("Exuberant nibble"); - } - s.metaBlockLength |= bits << (i * 4); - } - } - s.metaBlockLength++; - if (s.inputEnd == 0) { - s.isUncompressed = BitReader.readFewBits(s, 1); - } - } - - /** - * Decodes the next Huffman code from bit-stream. - */ - private static int readSymbol(int[] table, int offset, State s) { - int val = BitReader.peekBits(s); - offset += val & HUFFMAN_TABLE_MASK; - int bits = table[offset] >> 16; - int sym = table[offset] & 0xFFFF; - if (bits <= HUFFMAN_TABLE_BITS) { - s.bitOffset += bits; - return sym; - } - offset += sym; - int mask = (1 << bits) - 1; - offset += (val & mask) >>> HUFFMAN_TABLE_BITS; - s.bitOffset += ((table[offset] >> 16) + HUFFMAN_TABLE_BITS); - return table[offset] & 0xFFFF; - } - - private static int readBlockLength(int[] table, int offset, State s) { - BitReader.fillBitWindow(s); - int code = readSymbol(table, offset, s); - int n = BLOCK_LENGTH_N_BITS[code]; - BitReader.fillBitWindow(s); - return BLOCK_LENGTH_OFFSET[code] + BitReader.readBits(s, n); - } - - private static int translateShortCodes(int code, int[] ringBuffer, int index) { - if (code < NUM_DISTANCE_SHORT_CODES) { - index += DISTANCE_SHORT_CODE_INDEX_OFFSET[code]; - index &= 3; - return ringBuffer[index] + DISTANCE_SHORT_CODE_VALUE_OFFSET[code]; - } - return code - NUM_DISTANCE_SHORT_CODES + 1; - } - - private static void moveToFront(int[] v, int index) { - int value = v[index]; - for (; index > 0; index--) { - v[index] = v[index - 1]; - } - v[0] = value; - } - - private static void inverseMoveToFrontTransform(byte[] v, int vLen) { - int[] mtf = new int[256]; - for (int i = 0; i < 256; i++) { - mtf[i] = i; - } - for (int i = 0; i < vLen; i++) { - int index = v[i] & 0xFF; - v[i] = (byte) mtf[index]; - if (index != 0) { - moveToFront(mtf, index); - } - } - } - - private static void readHuffmanCodeLengths( - int[] codeLengthCodeLengths, int numSymbols, int[] codeLengths, State s) { - int symbol = 0; - int prevCodeLen = DEFAULT_CODE_LENGTH; - int repeat = 0; - int repeatCodeLen = 0; - int space = 32768; - int[] table = new int[32]; - - Huffman.buildHuffmanTable(table, 0, 5, codeLengthCodeLengths, CODE_LENGTH_CODES); - - while (symbol < numSymbols && space > 0) { - BitReader.readMoreInput(s); - BitReader.fillBitWindow(s); - int p = BitReader.peekBits(s) & 31; - s.bitOffset += table[p] >> 16; - int codeLen = table[p] & 0xFFFF; - if (codeLen < CODE_LENGTH_REPEAT_CODE) { - repeat = 0; - codeLengths[symbol++] = codeLen; - if (codeLen != 0) { - prevCodeLen = codeLen; - space -= 32768 >> codeLen; - } - } else { - int extraBits = codeLen - 14; - int newLen = 0; - if (codeLen == CODE_LENGTH_REPEAT_CODE) { - newLen = prevCodeLen; - } - if (repeatCodeLen != newLen) { - repeat = 0; - repeatCodeLen = newLen; - } - int oldRepeat = repeat; - if (repeat > 0) { - repeat -= 2; - repeat <<= extraBits; - } - BitReader.fillBitWindow(s); - repeat += BitReader.readFewBits(s, extraBits) + 3; - int repeatDelta = repeat - oldRepeat; - if (symbol + repeatDelta > numSymbols) { - throw new BrotliRuntimeException("symbol + repeatDelta > numSymbols"); // COV_NF_LINE - } - for (int i = 0; i < repeatDelta; i++) { - codeLengths[symbol++] = repeatCodeLen; - } - if (repeatCodeLen != 0) { - space -= repeatDelta << (15 - repeatCodeLen); - } - } - } - if (space != 0) { - throw new BrotliRuntimeException("Unused space"); // COV_NF_LINE - } - // TODO: Pass max_symbol to Huffman table builder instead? - Utils.fillIntsWithZeroes(codeLengths, symbol, numSymbols); - } - - static int checkDupes(int[] symbols, int length) { - for (int i = 0; i < length - 1; ++i) { - for (int j = i + 1; j < length; ++j) { - if (symbols[i] == symbols[j]) { - return 0; - } - } - } - return 1; - } - - // TODO: Use specialized versions for smaller tables. - static void readHuffmanCode(int alphabetSize, int[] table, int offset, State s) { - int ok = 1; - int simpleCodeOrSkip; - BitReader.readMoreInput(s); - // TODO: Avoid allocation. - int[] codeLengths = new int[alphabetSize]; - BitReader.fillBitWindow(s); - simpleCodeOrSkip = BitReader.readFewBits(s, 2); - if (simpleCodeOrSkip == 1) { // Read symbols, codes & code lengths directly. - int maxBitsCounter = alphabetSize - 1; - int maxBits = 0; - int[] symbols = new int[4]; - int numSymbols = BitReader.readFewBits(s, 2) + 1; - while (maxBitsCounter != 0) { - maxBitsCounter >>= 1; - maxBits++; - } - // TODO: uncomment when codeLengths is reused. - // Utils.fillWithZeroes(codeLengths, 0, alphabetSize); - for (int i = 0; i < numSymbols; i++) { - BitReader.fillBitWindow(s); - symbols[i] = BitReader.readFewBits(s, maxBits) % alphabetSize; - codeLengths[symbols[i]] = 2; - } - codeLengths[symbols[0]] = 1; - switch (numSymbols) { - case 2: - codeLengths[symbols[1]] = 1; - break; - case 4: - if (BitReader.readFewBits(s, 1) == 1) { - codeLengths[symbols[2]] = 3; - codeLengths[symbols[3]] = 3; - } else { - codeLengths[symbols[0]] = 2; - } - break; - default: - break; - } - ok = checkDupes(symbols, numSymbols); - } else { // Decode Huffman-coded code lengths. - int[] codeLengthCodeLengths = new int[CODE_LENGTH_CODES]; - int space = 32; - int numCodes = 0; - for (int i = simpleCodeOrSkip; i < CODE_LENGTH_CODES && space > 0; i++) { - int codeLenIdx = CODE_LENGTH_CODE_ORDER[i]; - BitReader.fillBitWindow(s); - int p = BitReader.peekBits(s) & 15; - // TODO: Demultiplex FIXED_TABLE. - s.bitOffset += FIXED_TABLE[p] >> 16; - int v = FIXED_TABLE[p] & 0xFFFF; - codeLengthCodeLengths[codeLenIdx] = v; - if (v != 0) { - space -= (32 >> v); - numCodes++; - } - } - if (space != 0 && numCodes != 1) { - ok = 0; - } - readHuffmanCodeLengths(codeLengthCodeLengths, alphabetSize, codeLengths, s); - } - if (ok == 0) { - throw new BrotliRuntimeException("Can't readHuffmanCode"); // COV_NF_LINE - } - Huffman.buildHuffmanTable(table, offset, HUFFMAN_TABLE_BITS, codeLengths, alphabetSize); - } - - private static int decodeContextMap(int contextMapSize, byte[] contextMap, State s) { - BitReader.readMoreInput(s); - int numTrees = decodeVarLenUnsignedByte(s) + 1; - - if (numTrees == 1) { - Utils.fillBytesWithZeroes(contextMap, 0, contextMapSize); - return numTrees; - } - - BitReader.fillBitWindow(s); - int useRleForZeros = BitReader.readFewBits(s, 1); - int maxRunLengthPrefix = 0; - if (useRleForZeros != 0) { - maxRunLengthPrefix = BitReader.readFewBits(s, 4) + 1; - } - int[] table = new int[HUFFMAN_TABLE_SIZE]; - readHuffmanCode(numTrees + maxRunLengthPrefix, table, 0, s); - for (int i = 0; i < contextMapSize; ) { - BitReader.readMoreInput(s); - BitReader.fillBitWindow(s); - int code = readSymbol(table, 0, s); - if (code == 0) { - contextMap[i] = 0; - i++; - } else if (code <= maxRunLengthPrefix) { - BitReader.fillBitWindow(s); - int reps = (1 << code) + BitReader.readFewBits(s, code); - while (reps != 0) { - if (i >= contextMapSize) { - throw new BrotliRuntimeException("Corrupted context map"); // COV_NF_LINE - } - contextMap[i] = 0; - i++; - reps--; - } - } else { - contextMap[i] = (byte) (code - maxRunLengthPrefix); - i++; - } - } - BitReader.fillBitWindow(s); - if (BitReader.readFewBits(s, 1) == 1) { - inverseMoveToFrontTransform(contextMap, contextMapSize); - } - return numTrees; - } - - private static int decodeBlockTypeAndLength(State s, int treeType, int numBlockTypes) { - final int[] ringBuffers = s.rings; - final int offset = 4 + treeType * 2; - BitReader.fillBitWindow(s); - int blockType = readSymbol(s.blockTrees, treeType * HUFFMAN_TABLE_SIZE, s); - int result = readBlockLength(s.blockTrees, (treeType + 3) * HUFFMAN_TABLE_SIZE, s); - - if (blockType == 1) { - blockType = ringBuffers[offset + 1] + 1; - } else if (blockType == 0) { - blockType = ringBuffers[offset]; - } else { - blockType -= 2; - } - if (blockType >= numBlockTypes) { - blockType -= numBlockTypes; - } - ringBuffers[offset] = ringBuffers[offset + 1]; - ringBuffers[offset + 1] = blockType; - return result; - } - - private static void decodeLiteralBlockSwitch(State s) { - s.literalBlockLength = decodeBlockTypeAndLength(s, 0, s.numLiteralBlockTypes); - int literalBlockType = s.rings[5]; - s.contextMapSlice = literalBlockType << LITERAL_CONTEXT_BITS; - s.literalTreeIndex = s.contextMap[s.contextMapSlice] & 0xFF; - s.literalTree = s.hGroup0[s.literalTreeIndex]; - int contextMode = s.contextModes[literalBlockType]; - s.contextLookupOffset1 = contextMode << 9; - s.contextLookupOffset2 = s.contextLookupOffset1 + 256; - } - - private static void decodeCommandBlockSwitch(State s) { - s.commandBlockLength = decodeBlockTypeAndLength(s, 1, s.numCommandBlockTypes); - s.treeCommandOffset = s.hGroup1[s.rings[7]]; - } - - private static void decodeDistanceBlockSwitch(State s) { - s.distanceBlockLength = decodeBlockTypeAndLength(s, 2, s.numDistanceBlockTypes); - s.distContextMapSlice = s.rings[9] << DISTANCE_CONTEXT_BITS; - } - - private static void maybeReallocateRingBuffer(State s) { - int newSize = s.maxRingBufferSize; - if (newSize > s.expectedTotalSize) { - /* TODO: Handle 2GB+ cases more gracefully. */ - int minimalNewSize = s.expectedTotalSize; - while ((newSize >> 1) > minimalNewSize) { - newSize >>= 1; - } - if ((s.inputEnd == 0) && newSize < 16384 && s.maxRingBufferSize >= 16384) { - newSize = 16384; - } - } - if (newSize <= s.ringBufferSize) { - return; - } - int ringBufferSizeWithSlack = newSize + MAX_TRANSFORMED_WORD_LENGTH; - byte[] newBuffer = new byte[ringBufferSizeWithSlack]; - if (s.ringBuffer.length != 0) { - System.arraycopy(s.ringBuffer, 0, newBuffer, 0, s.ringBufferSize); - } - s.ringBuffer = newBuffer; - s.ringBufferSize = newSize; - } - - private static void readNextMetablockHeader(State s) { - if (s.inputEnd != 0) { - s.nextRunningState = FINISHED; - s.runningState = INIT_WRITE; - return; - } - // TODO: Reset? Do we need this? - s.hGroup0 = new int[0]; - s.hGroup1 = new int[0]; - s.hGroup2 = new int[0]; - - BitReader.readMoreInput(s); - decodeMetaBlockLength(s); - if ((s.metaBlockLength == 0) && (s.isMetadata == 0)) { - return; - } - if ((s.isUncompressed != 0) || (s.isMetadata != 0)) { - BitReader.jumpToByteBoundary(s); - s.runningState = (s.isMetadata != 0) ? READ_METADATA : COPY_UNCOMPRESSED; - } else { - s.runningState = COMPRESSED_BLOCK_START; - } - - if (s.isMetadata != 0) { - return; - } - s.expectedTotalSize += s.metaBlockLength; - if (s.expectedTotalSize > 1 << 30) { - s.expectedTotalSize = 1 << 30; - } - if (s.ringBufferSize < s.maxRingBufferSize) { - maybeReallocateRingBuffer(s); - } - } - - private static int readMetablockPartition(State s, int treeType, int numBlockTypes) { - if (numBlockTypes <= 1) { - return 1 << 28; - } - readHuffmanCode(numBlockTypes + 2, s.blockTrees, treeType * HUFFMAN_TABLE_SIZE, s); - readHuffmanCode(NUM_BLOCK_LENGTH_CODES, s.blockTrees, (treeType + 3) * HUFFMAN_TABLE_SIZE, s); - return readBlockLength(s.blockTrees, (treeType + 3) * HUFFMAN_TABLE_SIZE, s); - } - - private static void readMetablockHuffmanCodesAndContextMaps(State s) { - s.numLiteralBlockTypes = decodeVarLenUnsignedByte(s) + 1; - s.literalBlockLength = readMetablockPartition(s, 0, s.numLiteralBlockTypes); - s.numCommandBlockTypes = decodeVarLenUnsignedByte(s) + 1; - s.commandBlockLength = readMetablockPartition(s, 1, s.numCommandBlockTypes); - s.numDistanceBlockTypes = decodeVarLenUnsignedByte(s) + 1; - s.distanceBlockLength = readMetablockPartition(s, 2, s.numDistanceBlockTypes); - - BitReader.readMoreInput(s); - BitReader.fillBitWindow(s); - s.distancePostfixBits = BitReader.readFewBits(s, 2); - s.numDirectDistanceCodes = - NUM_DISTANCE_SHORT_CODES + (BitReader.readFewBits(s, 4) << s.distancePostfixBits); - s.distancePostfixMask = (1 << s.distancePostfixBits) - 1; - int numDistanceCodes = s.numDirectDistanceCodes + (48 << s.distancePostfixBits); - // TODO: Reuse? - s.contextModes = new byte[s.numLiteralBlockTypes]; - for (int i = 0; i < s.numLiteralBlockTypes;) { - /* Ensure that less than 256 bits read between readMoreInput. */ - int limit = Math.min(i + 96, s.numLiteralBlockTypes); - for (; i < limit; ++i) { - BitReader.fillBitWindow(s); - s.contextModes[i] = (byte) (BitReader.readFewBits(s, 2)); - } - BitReader.readMoreInput(s); - } - - // TODO: Reuse? - s.contextMap = new byte[s.numLiteralBlockTypes << LITERAL_CONTEXT_BITS]; - int numLiteralTrees = decodeContextMap(s.numLiteralBlockTypes << LITERAL_CONTEXT_BITS, - s.contextMap, s); - s.trivialLiteralContext = 1; - for (int j = 0; j < s.numLiteralBlockTypes << LITERAL_CONTEXT_BITS; j++) { - if (s.contextMap[j] != j >> LITERAL_CONTEXT_BITS) { - s.trivialLiteralContext = 0; - break; - } - } - - // TODO: Reuse? - s.distContextMap = new byte[s.numDistanceBlockTypes << DISTANCE_CONTEXT_BITS]; - int numDistTrees = decodeContextMap(s.numDistanceBlockTypes << DISTANCE_CONTEXT_BITS, - s.distContextMap, s); - - s.hGroup0 = decodeHuffmanTreeGroup(NUM_LITERAL_CODES, numLiteralTrees, s); - s.hGroup1 = - decodeHuffmanTreeGroup(NUM_INSERT_AND_COPY_CODES, s.numCommandBlockTypes, s); - s.hGroup2 = decodeHuffmanTreeGroup(numDistanceCodes, numDistTrees, s); - - s.contextMapSlice = 0; - s.distContextMapSlice = 0; - s.contextLookupOffset1 = (int) (s.contextModes[0]) << 9; - s.contextLookupOffset2 = s.contextLookupOffset1 + 256; - s.literalTreeIndex = 0; - s.literalTree = s.hGroup0[0]; - s.treeCommandOffset = s.hGroup1[0]; - - s.rings[4] = 1; - s.rings[5] = 0; - s.rings[6] = 1; - s.rings[7] = 0; - s.rings[8] = 1; - s.rings[9] = 0; - } - - private static void copyUncompressedData(State s) { - final byte[] ringBuffer = s.ringBuffer; - - // Could happen if block ends at ring buffer end. - if (s.metaBlockLength <= 0) { - BitReader.reload(s); - s.runningState = BLOCK_START; - return; - } - - int chunkLength = Math.min(s.ringBufferSize - s.pos, s.metaBlockLength); - BitReader.copyBytes(s, ringBuffer, s.pos, chunkLength); - s.metaBlockLength -= chunkLength; - s.pos += chunkLength; - if (s.pos == s.ringBufferSize) { - s.nextRunningState = COPY_UNCOMPRESSED; - s.runningState = INIT_WRITE; - return; - } - - BitReader.reload(s); - s.runningState = BLOCK_START; - } - - private static int writeRingBuffer(State s) { - int toWrite = Math.min(s.outputLength - s.outputUsed, - s.ringBufferBytesReady - s.ringBufferBytesWritten); - if (toWrite != 0) { - System.arraycopy(s.ringBuffer, s.ringBufferBytesWritten, s.output, - s.outputOffset + s.outputUsed, toWrite); - s.outputUsed += toWrite; - s.ringBufferBytesWritten += toWrite; - } - - if (s.outputUsed < s.outputLength) { - return 1; - } else { - return 0; - } - } - - private static int[] decodeHuffmanTreeGroup(int alphabetSize, int n, State s) { - int[] group = new int[n + (n * HUFFMAN_TABLE_SIZE)]; - int next = n; - for (int i = 0; i < n; i++) { - group[i] = next; - Decode.readHuffmanCode(alphabetSize, group, next, s); - next += HUFFMAN_TABLE_SIZE; - } - return group; - } - - // Returns offset in ringBuffer that should trigger WRITE when filled. - private static int calculateFence(State s) { - int result = s.ringBufferSize; - if (s.isEager != 0) { - result = Math.min(result, s.ringBufferBytesWritten + s.outputLength - s.outputUsed); - } - return result; - } - - /** - * Actual decompress implementation. - */ - static void decompress(State s) { - if (s.runningState == UNINITIALIZED) { - throw new IllegalStateException("Can't decompress until initialized"); - } - if (s.runningState == CLOSED) { - throw new IllegalStateException("Can't decompress after close"); - } - int fence = calculateFence(s); - int ringBufferMask = s.ringBufferSize - 1; - byte[] ringBuffer = s.ringBuffer; - - while (s.runningState != FINISHED) { - // TODO: extract cases to methods for the better readability. - switch (s.runningState) { - case BLOCK_START: - if (s.metaBlockLength < 0) { - throw new BrotliRuntimeException("Invalid metablock length"); - } - readNextMetablockHeader(s); - /* Ring-buffer would be reallocated here. */ - fence = calculateFence(s); - ringBufferMask = s.ringBufferSize - 1; - ringBuffer = s.ringBuffer; - continue; - - case COMPRESSED_BLOCK_START: - readMetablockHuffmanCodesAndContextMaps(s); - s.runningState = MAIN_LOOP; - // Fall through - - case MAIN_LOOP: - if (s.metaBlockLength <= 0) { - s.runningState = BLOCK_START; - continue; - } - BitReader.readMoreInput(s); - if (s.commandBlockLength == 0) { - decodeCommandBlockSwitch(s); - } - s.commandBlockLength--; - BitReader.fillBitWindow(s); - int cmdCode = readSymbol(s.hGroup1, s.treeCommandOffset, s); - int rangeIdx = cmdCode >>> 6; - s.distanceCode = 0; - if (rangeIdx >= 2) { - rangeIdx -= 2; - s.distanceCode = -1; - } - int insertCode = INSERT_RANGE_LUT[rangeIdx] + ((cmdCode >>> 3) & 7); - BitReader.fillBitWindow(s); - int insertBits = INSERT_LENGTH_N_BITS[insertCode]; - int insertExtra = BitReader.readBits(s, insertBits); - s.insertLength = INSERT_LENGTH_OFFSET[insertCode] + insertExtra; - int copyCode = COPY_RANGE_LUT[rangeIdx] + (cmdCode & 7); - BitReader.fillBitWindow(s); - int copyBits = COPY_LENGTH_N_BITS[copyCode]; - int copyExtra = BitReader.readBits(s, copyBits); - s.copyLength = COPY_LENGTH_OFFSET[copyCode] + copyExtra; - - s.j = 0; - s.runningState = INSERT_LOOP; - - // Fall through - case INSERT_LOOP: - if (s.trivialLiteralContext != 0) { - while (s.j < s.insertLength) { - BitReader.readMoreInput(s); - if (s.literalBlockLength == 0) { - decodeLiteralBlockSwitch(s); - } - s.literalBlockLength--; - BitReader.fillBitWindow(s); - ringBuffer[s.pos] = - (byte) readSymbol(s.hGroup0, s.literalTree, s); - s.pos++; - s.j++; - if (s.pos >= fence) { - s.nextRunningState = INSERT_LOOP; - s.runningState = INIT_WRITE; - break; - } - } - } else { - int prevByte1 = ringBuffer[(s.pos - 1) & ringBufferMask] & 0xFF; - int prevByte2 = ringBuffer[(s.pos - 2) & ringBufferMask] & 0xFF; - while (s.j < s.insertLength) { - BitReader.readMoreInput(s); - if (s.literalBlockLength == 0) { - decodeLiteralBlockSwitch(s); - } - int literalTreeIndex = s.contextMap[s.contextMapSlice - + (Context.LOOKUP[s.contextLookupOffset1 + prevByte1] - | Context.LOOKUP[s.contextLookupOffset2 + prevByte2])] & 0xFF; - s.literalBlockLength--; - prevByte2 = prevByte1; - BitReader.fillBitWindow(s); - prevByte1 = readSymbol( - s.hGroup0, s.hGroup0[literalTreeIndex], s); - ringBuffer[s.pos] = (byte) prevByte1; - s.pos++; - s.j++; - if (s.pos >= fence) { - s.nextRunningState = INSERT_LOOP; - s.runningState = INIT_WRITE; - break; - } - } - } - if (s.runningState != INSERT_LOOP) { - continue; - } - s.metaBlockLength -= s.insertLength; - if (s.metaBlockLength <= 0) { - s.runningState = MAIN_LOOP; - continue; - } - if (s.distanceCode < 0) { - BitReader.readMoreInput(s); - if (s.distanceBlockLength == 0) { - decodeDistanceBlockSwitch(s); - } - s.distanceBlockLength--; - BitReader.fillBitWindow(s); - s.distanceCode = readSymbol(s.hGroup2, s.hGroup2[ - s.distContextMap[s.distContextMapSlice - + (s.copyLength > 4 ? 3 : s.copyLength - 2)] & 0xFF], s); - if (s.distanceCode >= s.numDirectDistanceCodes) { - s.distanceCode -= s.numDirectDistanceCodes; - int postfix = s.distanceCode & s.distancePostfixMask; - s.distanceCode >>>= s.distancePostfixBits; - int n = (s.distanceCode >>> 1) + 1; - int offset = ((2 + (s.distanceCode & 1)) << n) - 4; - BitReader.fillBitWindow(s); - int distanceExtra = BitReader.readBits(s, n); - s.distanceCode = s.numDirectDistanceCodes + postfix - + ((offset + distanceExtra) << s.distancePostfixBits); - } - } - - // Convert the distance code to the actual distance by possibly looking up past distances - // from the ringBuffer. - s.distance = translateShortCodes(s.distanceCode, s.rings, s.distRbIdx); - if (s.distance < 0) { - throw new BrotliRuntimeException("Negative distance"); // COV_NF_LINE - } - - if (s.maxDistance != s.maxBackwardDistance - && s.pos < s.maxBackwardDistance) { - s.maxDistance = s.pos; - } else { - s.maxDistance = s.maxBackwardDistance; - } - - if (s.distance > s.maxDistance) { - s.runningState = TRANSFORM; - continue; - } - - if (s.distanceCode > 0) { - s.rings[s.distRbIdx & 3] = s.distance; - s.distRbIdx++; - } - - if (s.copyLength > s.metaBlockLength) { - throw new BrotliRuntimeException("Invalid backward reference"); // COV_NF_LINE - } - s.j = 0; - s.runningState = COPY_LOOP; - // fall through - case COPY_LOOP: - int src = (s.pos - s.distance) & ringBufferMask; - int dst = s.pos; - int copyLength = s.copyLength - s.j; - int srcEnd = src + copyLength; - int dstEnd = dst + copyLength; - if ((srcEnd < ringBufferMask) && (dstEnd < ringBufferMask)) { - if (copyLength < 12 || (srcEnd > dst && dstEnd > src)) { - for (int k = 0; k < copyLength; ++k) { - ringBuffer[dst++] = ringBuffer[src++]; - } - } else { - Utils.copyBytesWithin(ringBuffer, dst, src, srcEnd); - } - s.j += copyLength; - s.metaBlockLength -= copyLength; - s.pos += copyLength; - } else { - for (; s.j < s.copyLength;) { - ringBuffer[s.pos] = - ringBuffer[(s.pos - s.distance) & ringBufferMask]; - s.metaBlockLength--; - s.pos++; - s.j++; - if (s.pos >= fence) { - s.nextRunningState = COPY_LOOP; - s.runningState = INIT_WRITE; - break; - } - } - } - if (s.runningState == COPY_LOOP) { - s.runningState = MAIN_LOOP; - } - continue; - - case TRANSFORM: - if (s.copyLength >= MIN_WORD_LENGTH - && s.copyLength <= MAX_WORD_LENGTH) { - int offset = DICTIONARY_OFFSETS_BY_LENGTH[s.copyLength]; - int wordId = s.distance - s.maxDistance - 1; - int shift = DICTIONARY_SIZE_BITS_BY_LENGTH[s.copyLength]; - int mask = (1 << shift) - 1; - int wordIdx = wordId & mask; - int transformIdx = wordId >>> shift; - offset += wordIdx * s.copyLength; - if (transformIdx < Transform.NUM_TRANSFORMS) { - int len = Transform.transformDictionaryWord(ringBuffer, s.pos, - Dictionary.getData(), offset, s.copyLength, transformIdx); - s.pos += len; - s.metaBlockLength -= len; - if (s.pos >= fence) { - s.nextRunningState = MAIN_LOOP; - s.runningState = INIT_WRITE; - continue; - } - } else { - throw new BrotliRuntimeException("Invalid backward reference"); // COV_NF_LINE - } - } else { - throw new BrotliRuntimeException("Invalid backward reference"); // COV_NF_LINE - } - s.runningState = MAIN_LOOP; - continue; - - case READ_METADATA: - while (s.metaBlockLength > 0) { - BitReader.readMoreInput(s); - // Optimize - BitReader.fillBitWindow(s); - BitReader.readFewBits(s, 8); - s.metaBlockLength--; - } - s.runningState = BLOCK_START; - continue; - - - case COPY_UNCOMPRESSED: - copyUncompressedData(s); - continue; - - case INIT_WRITE: - s.ringBufferBytesReady = Math.min(s.pos, s.ringBufferSize); - s.runningState = WRITE; - // fall through - case WRITE: - if (writeRingBuffer(s) == 0) { - // Output buffer is full. - return; - } - if (s.pos >= s.maxBackwardDistance) { - s.maxDistance = s.maxBackwardDistance; - } - // Wrap the ringBuffer. - if (s.pos >= s.ringBufferSize) { - if (s.pos > s.ringBufferSize) { - Utils.copyBytesWithin(ringBuffer, 0, s.ringBufferSize, s.pos); - } - s.pos &= ringBufferMask; - s.ringBufferBytesWritten = 0; - } - s.runningState = s.nextRunningState; - continue; - - default: - throw new BrotliRuntimeException("Unexpected state " + s.runningState); - } - } - if (s.runningState == FINISHED) { - if (s.metaBlockLength < 0) { - throw new BrotliRuntimeException("Invalid metablock length"); - } - BitReader.jumpToByteBoundary(s); - BitReader.checkHealth(s, 1); - } - } -} diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/DecodeTest.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/DecodeTest.java deleted file mode 100644 index a0c2784..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/DecodeTest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -import static org.junit.Assert.assertArrayEquals; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** - * Tests for {@link Decode}. - */ -@RunWith(JUnit4.class) -public class DecodeTest { - - static byte[] readUniBytes(String uniBytes) { - byte[] result = new byte[uniBytes.length()]; - for (int i = 0; i < result.length; ++i) { - result[i] = (byte) uniBytes.charAt(i); - } - return result; - } - - private byte[] decompress(byte[] data, boolean byByte) throws IOException { - byte[] buffer = new byte[65536]; - ByteArrayInputStream input = new ByteArrayInputStream(data); - ByteArrayOutputStream output = new ByteArrayOutputStream(); - BrotliInputStream brotliInput = new BrotliInputStream(input); - if (byByte) { - byte[] oneByte = new byte[1]; - while (true) { - int next = brotliInput.read(); - if (next == -1) { - break; - } - oneByte[0] = (byte) next; - output.write(oneByte, 0, 1); - } - } else { - while (true) { - int len = brotliInput.read(buffer, 0, buffer.length); - if (len <= 0) { - break; - } - output.write(buffer, 0, len); - } - } - brotliInput.close(); - return output.toByteArray(); - } - - private void checkDecodeResource(String expected, String compressed) throws IOException { - byte[] expectedBytes = readUniBytes(expected); - byte[] compressedBytes = readUniBytes(compressed); - byte[] actual = decompress(compressedBytes, false); - assertArrayEquals(expectedBytes, actual); - byte[] actualByByte = decompress(compressedBytes, true); - assertArrayEquals(expectedBytes, actualByByte); - } - - @Test - public void testEmpty() throws IOException { - checkDecodeResource( - "", - "\u0006"); - } - - @Test - public void testX() throws IOException { - checkDecodeResource( - "X", - "\u000B\u0000\u0080X\u0003"); - } - - @Test - public void testX10Y10() throws IOException { - checkDecodeResource( - "XXXXXXXXXXYYYYYYYYYY", - "\u001B\u0013\u0000\u0000\u00A4\u00B0\u00B2\u00EA\u0081G\u0002\u008A"); - } - - @Test - public void testX64() throws IOException { - checkDecodeResource( - "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", - "\u001B\u003F\u0000\u0000$\u00B0\u00E2\u0099\u0080\u0012"); - } - - @Test - public void testUkkonooa() throws IOException { - checkDecodeResource( - "ukko nooa, ukko nooa oli kunnon mies, kun han meni saunaan, " - + "pisti laukun naulaan, ukko nooa, ukko nooa oli kunnon mies.", - "\u001Bv\u0000\u0000\u0014J\u00AC\u009Bz\u00BD\u00E1\u0097\u009D\u007F\u008E\u00C2\u0082" - + "6\u000E\u009C\u00E0\u0090\u0003\u00F7\u008B\u009E8\u00E6\u00B6\u0000\u00AB\u00C3\u00CA" - + "\u00A0\u00C2\u00DAf6\u00DC\u00CD\u0080\u008D.!\u00D7n\u00E3\u00EAL\u00B8\u00F0\u00D2" - + "\u00B8\u00C7\u00C2pM:\u00F0i~\u00A1\u00B8Es\u00AB\u00C4W\u001E"); - } - - @Test - public void testMonkey() throws IOException { - checkDecodeResource( - "znxcvnmz,xvnm.,zxcnv.,xcn.z,vn.zvn.zxcvn.,zxcn.vn.v,znm.,vnzx.,vnzxc.vn.z,vnz.,nv.z,nvmz" - + "xc,nvzxcvcnm.,vczxvnzxcnvmxc.zmcnvzm.,nvmc,nzxmc,vn.mnnmzxc,vnxcnmv,znvzxcnmv,.xcnvm,zxc" - + "nzxv.zx,qweryweurqioweupropqwutioweupqrioweutiopweuriopweuriopqwurioputiopqwuriowuqeriou" - + "pqweropuweropqwurweuqriopuropqwuriopuqwriopuqweopruioqweurqweuriouqweopruioupqiytioqtyio" - + "wtyqptypryoqweutioioqtweqruowqeytiowquiourowetyoqwupiotweuqiorweuqroipituqwiorqwtioweuri" - + "ouytuioerytuioweryuitoweytuiweyuityeruirtyuqriqweuropqweiruioqweurioqwuerioqwyuituierwot" - + "ueryuiotweyrtuiwertyioweryrueioqptyioruyiopqwtjkasdfhlafhlasdhfjklashjkfhasjklfhklasjdfh" - + "klasdhfjkalsdhfklasdhjkflahsjdkfhklasfhjkasdfhasfjkasdhfklsdhalghhaf;hdklasfhjklashjklfa" - + "sdhfasdjklfhsdjklafsd;hkldadfjjklasdhfjasddfjklfhakjklasdjfkl;asdjfasfljasdfhjklasdfhjka" - + "ghjkashf;djfklasdjfkljasdklfjklasdjfkljasdfkljaklfj", - "\u001BJ\u0003\u0000\u008C\u0094n\u00DE\u00B4\u00D7\u0096\u00B1x\u0086\u00F2-\u00E1\u001A" - + "\u00BC\u000B\u001C\u00BA\u00A9\u00C7\u00F7\u00CCn\u00B2B4QD\u008BN\u0013\b\u00A0\u00CDn" - + "\u00E8,\u00A5S\u00A1\u009C],\u001D#\u001A\u00D2V\u00BE\u00DB\u00EB&\u00BA\u0003e|\u0096j" - + "\u00A2v\u00EC\u00EF\u0087G3\u00D6\'\u000Ec\u0095\u00E2\u001D\u008D,\u00C5\u00D1(\u009F`" - + "\u0094o\u0002\u008B\u00DD\u00AAd\u0094,\u001E;e|\u0007EZ\u00B2\u00E2\u00FCI\u0081,\u009F" - + "@\u00AE\u00EFh\u0081\u00AC\u0016z\u000F\u00F5;m\u001C\u00B9\u001E-_\u00D5\u00C8\u00AF^" - + "\u0085\u00AA\u0005\u00BESu\u00C2\u00B0\"\u008A\u0015\u00C6\u00A3\u00B1\u00E6B\u0014" - + "\u00F4\u0084TS\u0019_\u00BE\u00C3\u00F2\u001D\u00D1\u00B7\u00E5\u00DD\u00B6\u00D9#\u00C6" - + "\u00F6\u009F\u009E\u00F6Me0\u00FB\u00C0qE\u0004\u00AD\u0003\u00B5\u00BE\u00C9\u00CB" - + "\u00FD\u00E2PZFt\u0004\r\u00FF \u0004w\u00B2m\'\u00BFG\u00A9\u009D\u001B\u0096,b\u0090#" - + "\u008B\u00E0\u00F8\u001D\u00CF\u00AF\u001D=\u00EE\u008A\u00C8u#f\u00DD\u00DE\u00D6m" - + "\u00E3*\u0082\u008Ax\u008A\u00DB\u00E6 L\u00B7\\c\u00BA0\u00E3?\u00B6\u00EE\u008C\"" - + "\u00A2*\u00B0\"\n\u0099\u00FF=bQ\u00EE\b\u00F6=J\u00E4\u00CC\u00EF\"\u0087\u0011\u00E2" - + "\u0083(\u00E4\u00F5\u008F5\u0019c[\u00E1Z\u0092s\u00DD\u00A1P\u009D8\\\u00EB\u00B5\u0003" - + "jd\u0090\u0094\u00C8\u008D\u00FB/\u008A\u0086\"\u00CC\u001D\u0087\u00E0H\n\u0096w\u00909" - + "\u00C6##H\u00FB\u0011GV\u00CA \u00E3B\u0081\u00F7w2\u00C1\u00A5\\@!e\u0017@)\u0017\u0017" - + "lV2\u00988\u0006\u00DC\u0099M3)\u00BB\u0002\u00DFL&\u0093l\u0017\u0082\u0086 \u00D7" - + "\u0003y}\u009A\u0000\u00D7\u0087\u0000\u00E7\u000Bf\u00E3Lfqg\b2\u00F9\b>\u00813\u00CD" - + "\u0017r1\u00F0\u00B8\u0094RK\u00901\u008Eh\u00C1\u00EF\u0090\u00C9\u00E5\u00F2a\tr%" - + "\u00AD\u00EC\u00C5b\u00C0\u000B\u0012\u0005\u00F7\u0091u\r\u00EEa..\u0019\t\u00C2\u0003" - ); - } - - @Test - public void testFox() throws IOException { - checkDecodeResource( - "The quick brown fox jumps over the lazy dog", - "\u001B*\u0000\u0000\u0004\u0004\u00BAF:\u0085\u0003\u00E9\u00FA\f\u0091\u0002H\u0011," - + "\u00F3\u008A:\u00A3V\u007F\u001A\u00AE\u00BF\u00A4\u00AB\u008EM\u00BF\u00ED\u00E2\u0004K" - + "\u0091\u00FF\u0087\u00E9\u001E"); - } - - @Test - public void testUtils() { - new Context(); - new Decode(); - new Dictionary(); - new Huffman(); - } -} diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Dictionary.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Dictionary.java deleted file mode 100644 index a6867b7..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/Dictionary.java +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -import java.nio.ByteBuffer; - -/** - * Collection of static dictionary words. - * - *
Dictionary content is loaded from binary resource when {@link #getData()} is executed for the - * first time. Consequently, it saves memory and CPU in case dictionary is not required. - * - *
One possible drawback is that multiple threads that need dictionary data may be blocked (only - * once in each classworld). To avoid this, it is enough to call {@link #getData()} proactively. - */ -public final class Dictionary { - private static volatile ByteBuffer data; - - private static class DataLoader { - static final boolean OK; - - static { - boolean ok = true; - try { - Class.forName(Dictionary.class.getPackage().getName() + ".DictionaryData"); - } catch (Throwable ex) { - ok = false; - } - OK = ok; - } - } - - public static void setData(ByteBuffer data) { - if (!data.isDirect() || !data.isReadOnly()) { - throw new BrotliRuntimeException("data must be a direct read-only byte buffer"); - } - Dictionary.data = data; - } - - public static ByteBuffer getData() { - if (data != null) { - return data; - } - if (!DataLoader.OK) { - throw new BrotliRuntimeException("brotli dictionary is not set"); - } - /* Might have been set when {@link DictionaryData} was loaded.*/ - return data; - } -} diff --git a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/DictionaryData.java b/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/DictionaryData.java deleted file mode 100644 index 2355b28..0000000 --- a/app/src/main/cpp/woff2/brotli/java/org/brotli/dec/DictionaryData.java +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright 2015 Google Inc. All Rights Reserved. - - Distributed under MIT license. - See file LICENSE for detail or copy at https://opensource.org/licenses/MIT -*/ - -package org.brotli.dec; - -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; - -/** - * Built-in dictionary data. - * - * When this class is loaded, it sets its data: {@link Dictionary#setData(ByteBuffer)}. - */ -final class DictionaryData { - private static final String DATA0 = "timedownlifeleftbackcodedatashowonlysitecityopenjustlikefreeworktextyearoverbodyloveformbookplaylivelinehelphomesidemorewordlongthemviewfindpagedaysfullheadtermeachareafromtruemarkableuponhighdatelandnewsevennextcasebothpostusedmadehandherewhatnameLinkblogsizebaseheldmakemainuser') +holdendswithNewsreadweresigntakehavegameseencallpathwellplusmenufilmpartjointhislistgoodneedwayswestjobsmindalsologorichuseslastteamarmyfoodkingwilleastwardbestfirePageknowaway.pngmovethanloadgiveselfnotemuchfeedmanyrockicononcelookhidediedHomerulehostajaxinfoclublawslesshalfsomesuchzone100%onescareTimeracebluefourweekfacehopegavehardlostwhenparkkeptpassshiproomHTMLplanTypedonesavekeepflaglinksoldfivetookratetownjumpthusdarkcardfilefearstaykillthatfallautoever.comtalkshopvotedeepmoderestturnbornbandfellroseurl(skinrolecomeactsagesmeetgold.jpgitemvaryfeltthensenddropViewcopy1.0\"stopelseliestourpack.gifpastcss?graymean>rideshotlatesaidroadvar feeljohnrickportfast'UA-deadpoorbilltypeU.S.woodmust2px;Inforankwidewantwalllead[0];paulwavesure$('#waitmassarmsgoesgainlangpaid!-- lockunitrootwalkfirmwifexml\"songtest20pxkindrowstoolfontmailsafestarmapscorerainflowbabyspansays4px;6px;artsfootrealwikiheatsteptriporg/lakeweaktoldFormcastfansbankveryrunsjulytask1px;goalgrewslowedgeid=\"sets5px;.js?40pxif (soonseatnonetubezerosentreedfactintogiftharm18pxcamehillboldzoomvoideasyringfillpeakinitcost3px;jacktagsbitsrolleditknewnearironfreddiskwentsoilputs/js/holyT22:ISBNT20:adamsees
P>Q\u0002P8P7P=P>P4P>Q\u0002P>P6P5P>P=P8Q\u0005P\u001DP0P5P5P1Q\u000BPP2Q\u000BP2P>P\u001DP>P>P1P\u001FP>P;P8P=P8P P$P\u001DP5P\u001CQ\u000BQ\u0002Q\u000BP\u001EP=P8Pthing.org/multiheardPowerstandtokensolid(thisbringshipsstafftriedcallsfullyfactsagentThis //-->adminegyptEvent15px;Emailtrue\"crossspentblogsbox\">notedleavechinasizesguestrobotheavytrue,sevengrandcrimesignsawaredancephase>\n \n \r\nname=diegopage swiss-->\n\n#fff;\">Log.com\"treatsheet) && 14px;sleepntentfiledja:c\u0003id=\"cName\"worseshots-box-delta\n<bears:48Z spendbakershops= \"\";php\">ction13px;brianhellosize=o=%2F joinmaybe , fjsimg\" \")[0]MTopBType\"newlyDanskczechtrailknowsfaq\">zh-cn10);\n-1\");type=bluestrulydavis.js';>\r\n\r\nform jesus100% menu.\r\n\t\r\nwalesrisksumentddingb-likteachgif\" vegasdanskeestishqipsuomisobredesdeentretodospuedeaC1osestC!tienehastaotrospartedondenuevohacerformamismomejormundoaquC-dC-assC3loayudafechatodastantomenosdatosotrassitiomuchoahoralugarmayorestoshorastenerantesfotosestaspaC-snuevasaludforosmedioquienmesespoderchileserC!vecesdecirjosC)estarventagrupohechoellostengoamigocosasnivelgentemismaairesjuliotemashaciafavorjuniolibrepuntobuenoautorabrilbuenatextomarzosaberlistaluegocC3moenerojuegoperC:haberestoynuncamujervalorfueralibrogustaigualvotoscasosguC-apuedosomosavisousteddebennochebuscafaltaeurosseriedichocursoclavecasasleC3nplazolargoobrasvistaapoyojuntotratavistocrearcampohemoscincocargopisosordenhacenC!readiscopedrocercapuedapapelmenorC:tilclarojorgecalleponertardenadiemarcasigueellassiglocochemotosmadreclaserestoniC1oquedapasarbancohijosviajepabloC)stevienereinodejarfondocanalnorteletracausatomarmanoslunesautosvillavendopesartipostengamarcollevapadreunidovamoszonasambosbandamariaabusomuchasubirriojavivirgradochicaallC-jovendichaestantalessalirsuelopesosfinesllamabuscoC)stalleganegroplazahumorpagarjuntadobleislasbolsabaC1ohablaluchaC\u0001readicenjugarnotasvalleallC!cargadolorabajoestC)gustomentemariofirmacostofichaplatahogarartesleyesaquelmuseobasespocosmitadcielochicomiedoganarsantoetapadebesplayaredessietecortecoreadudasdeseoviejodeseaaguas"domaincommonstatuseventsmastersystemactionbannerremovescrollupdateglobalmediumfilternumberchangeresultpublicscreenchoosenormaltravelissuessourcetargetspringmodulemobileswitchphotosborderregionitselfsocialactivecolumnrecordfollowtitle>eitherlengthfamilyfriendlayoutauthorcreatereviewsummerserverplayedplayerexpandpolicyformatdoublepointsseriespersonlivingdesignmonthsforcesuniqueweightpeopleenergynaturesearchfigurehavingcustomoffsetletterwindowsubmitrendergroupsuploadhealthmethodvideosschoolfutureshadowdebatevaluesObjectothersrightsleaguechromesimplenoticesharedendingseasonreportonlinesquarebuttonimagesenablemovinglatestwinterFranceperiodstrongrepeatLondondetailformeddemandsecurepassedtoggleplacesdevicestaticcitiesstreamyellowattackstreetflighthiddeninfo\">openedusefulvalleycausesleadersecretseconddamagesportsexceptratingsignedthingseffectfieldsstatesofficevisualeditorvolumeReportmuseummoviesparentaccessmostlymother\" id=\"marketgroundchancesurveybeforesymbolmomentspeechmotioninsidematterCenterobjectexistsmiddleEuropegrowthlegacymannerenoughcareeransweroriginportalclientselectrandomclosedtopicscomingfatheroptionsimplyraisedescapechosenchurchdefinereasoncorneroutputmemoryiframepolicemodelsNumberduringoffersstyleskilledlistedcalledsilvermargindeletebetterbrowselimitsGlobalsinglewidgetcenterbudgetnowrapcreditclaimsenginesafetychoicespirit-stylespreadmakingneededrussiapleaseextentScriptbrokenallowschargedividefactormember-basedtheoryconfigaroundworkedhelpedChurchimpactshouldalwayslogo\" bottomlist\">){var prefixorangeHeader.push(couplegardenbridgelaunchReviewtakingvisionlittledatingButtonbeautythemesforgotSearchanchoralmostloadedChangereturnstringreloadMobileincomesupplySourceordersviewed courseAbout island: The dialoghousesBEGIN MexicostartscentreheightaddingIslandassetsEmpireSchooleffortdirectnearlymanualSelect.\n\nOnejoinedmenu\">PhilipawardshandleimportOfficeregardskillsnationSportsdegreeweekly (e.g.behinddoctorloggedunitedbeyond-scaleacceptservedmarineFootercamera
P=P0P3P4P5PP3P>P4P2P>Q\u0002Q\u0002P0P
P2P0Q\u0001P2P0P
Q\u0002Q\u0003Q\u0002P=P0P4P4P=Q\u000FP\u0012P>Q\u0002Q\u0002Q\u0000P8P=P5P9P\u0012P0Q\u0001P=P8P Q\u0002Q\u0000Q\u0003P1P\u001EP=P8PP P9P4P2P5P>P=P>Q\u0001Q\u0003P4`$\u0015`%\u0007`$9`%\u0008`$\u0015`%\u0000`$8`%\u0007`$\u0015`$>`$\u0015`%\u000B`$\u0014`$0`$*`$0`$(`%\u0007`$\u000F`$\u0015`$\u0015`$?`$-`%\u0000`$\u0007`$8`$\u0015`$0`$$`%\u000B`$9`%\u000B`$\u0006`$*`$9`%\u0000`$/`$9`$/`$>`$$`$\u0015`$%`$>jagran`$\u0006`$\u001C`$\u001C`%\u000B`$\u0005`$,`$&`%\u000B`$\u0017`$\u0008`$\u001C`$>`$\u0017`$\u000F`$9`$.`$\u0007`$(`$5`$9`$/`%\u0007`$%`%\u0007`$%`%\u0000`$\u0018`$0`$\u001C`$,`$&`%\u0000`$\u0015`$\u0008`$\u001C`%\u0000`$5`%\u0007`$(`$\u0008`$(`$\u000F`$9`$0`$\t`$8`$.`%\u0007`$\u0015`$.`$5`%\u000B`$2`%\u0007`$8`$,`$.`$\u0008`$&`%\u0007`$\u0013`$0`$\u0006`$.`$,`$8`$-`$0`$,`$(`$\u001A`$2`$.`$(`$\u0006`$\u0017`$8`%\u0000`$2`%\u0000X9Y\u0004Y\tX%Y\u0004Y\tY\u0007X0X'X\"X.X1X9X/X/X'Y\u0004Y\tY\u0007X0Y\u0007X5Y\u0008X1X:Y\nX1Y\u0003X'Y\u0006Y\u0008Y\u0004X'X(Y\nY\u0006X9X1X6X0Y\u0004Y\u0003Y\u0007Y\u0006X'Y\nY\u0008Y\u0005Y\u0002X'Y\u0004X9Y\u0004Y\nX'Y\u0006X'Y\u0004Y\u0003Y\u0006X-X*Y\tY\u0002X(Y\u0004Y\u0008X-X)X'X.X1Y\u0001Y\u0002X7X9X(X/X1Y\u0003Y\u0006X%X0X'Y\u0003Y\u0005X'X'X-X/X%Y\u0004X'Y\u0001Y\nY\u0007X(X9X6Y\u0003Y\nY\u0001X(X-X+Y\u0008Y\u0005Y\u0006Y\u0008Y\u0007Y\u0008X#Y\u0006X'X,X/X'Y\u0004Y\u0007X'X3Y\u0004Y\u0005X9Y\u0006X/Y\u0004Y\nX3X9X(X1X5Y\u0004Y\tY\u0005Y\u0006X0X(Y\u0007X'X#Y\u0006Y\u0007Y\u0005X+Y\u0004Y\u0003Y\u0006X*X'Y\u0004X'X-Y\nX+Y\u0005X5X1X4X1X-X-Y\u0008Y\u0004Y\u0008Y\u0001Y\nX'X0X'Y\u0004Y\u0003Y\u0004Y\u0005X1X)X'Y\u0006X*X'Y\u0004Y\u0001X#X(Y\u0008X.X'X5X#Y\u0006X*X'Y\u0006Y\u0007X'Y\u0004Y\nX9X6Y\u0008Y\u0008Y\u0002X/X'X(Y\u0006X.Y\nX1X(Y\u0006X*Y\u0004Y\u0003Y\u0005X4X'X!Y\u0008Y\u0007Y\nX'X(Y\u0008Y\u0002X5X5Y\u0008Y\u0005X'X1Y\u0002Y\u0005X#X-X/Y\u0006X-Y\u0006X9X/Y\u0005X1X#Y\nX'X-X)Y\u0003X*X(X/Y\u0008Y\u0006Y\nX,X(Y\u0005Y\u0006Y\u0007X*X-X*X,Y\u0007X)X3Y\u0006X)Y\nX*Y\u0005Y\u0003X1X)X:X2X)Y\u0006Y\u0001X3X(Y\nX*Y\u0004Y\u0004Y\u0007Y\u0004Y\u0006X'X*Y\u0004Y\u0003Y\u0002Y\u0004X(Y\u0004Y\u0005X'X9Y\u0006Y\u0007X#Y\u0008Y\u0004X4Y\nX!Y\u0006Y\u0008X1X#Y\u0005X'Y\u0001Y\nY\u0003X(Y\u0003Y\u0004X0X'X*X1X*X(X(X#Y\u0006Y\u0007Y\u0005X3X'Y\u0006Y\u0003X(Y\nX9Y\u0001Y\u0002X/X-X3Y\u0006Y\u0004Y\u0007Y\u0005X4X9X1X#Y\u0007Y\u0004X4Y\u0007X1Y\u0002X7X1X7Y\u0004X(profileservicedefaulthimselfdetailscontentsupportstartedmessagesuccessfashion
countryaccountcreatedstoriesresultsrunningprocesswritingobjectsvisiblewelcomearticleunknownnetworkcompanydynamicbrowserprivacyproblemServicerespectdisplayrequestreservewebsitehistoryfriendsoptionsworkingversionmillionchannelwindow.addressvisitedweathercorrectproductedirectforwardyou canremovedsubjectcontrolarchivecurrentreadinglibrarylimitedmanagerfurthersummarymachineminutesprivatecontextprogramsocietynumberswrittenenabledtriggersourcesloadingelementpartnerfinallyperfectmeaningsystemskeepingculture",journalprojectsurfaces"expiresreviewsbalanceEnglishContentthroughPlease opinioncontactaverageprimaryvillageSpanishgallerydeclinemeetingmissionpopularqualitymeasuregeneralspeciessessionsectionwriterscounterinitialreportsfiguresmembersholdingdisputeearlierexpressdigitalpictureAnothermarriedtrafficleadingchangedcentralvictoryimages/reasonsstudiesfeaturelistingmust beschoolsVersionusuallyepisodeplayinggrowingobviousoverlaypresentactions\r\nwrapperalreadycertainrealitystorageanotherdesktopofferedpatternunusualDigitalcapitalWebsitefailureconnectreducedAndroiddecadesregular & animalsreleaseAutomatgettingmethodsnothingPopularcaptionletterscapturesciencelicensechangesEngland=1&History = new CentralupdatedSpecialNetworkrequirecommentwarningCollegetoolbarremainsbecauseelectedDeutschfinanceworkersquicklybetweenexactlysettingdiseaseSocietyweaponsexhibit<!--Controlclassescoveredoutlineattacksdevices(windowpurposetitle=\"Mobile killingshowingItaliandroppedheavilyeffects-1']);\nconfirmCurrentadvancesharingopeningdrawingbillionorderedGermanyrelatedincludewhetherdefinedSciencecatalogArticlebuttonslargestuniformjourneysidebarChicagoholidayGeneralpassage,"animatefeelingarrivedpassingnaturalroughly.\n\nThe but notdensityBritainChineselack oftributeIreland\" data-factorsreceivethat isLibraryhusbandin factaffairsCharlesradicalbroughtfindinglanding:lang=\"return leadersplannedpremiumpackageAmericaEdition]"Messageneed tovalue=\"complexlookingstationbelievesmaller-mobilerecordswant tokind ofFirefoxyou aresimilarstudiedmaximumheadingrapidlyclimatekingdomemergedamountsfoundedpioneerformuladynastyhow to SupportrevenueeconomyResultsbrothersoldierlargelycalling."AccountEdward segmentRobert effortsPacificlearnedup withheight:we haveAngelesnations_searchappliedacquiremassivegranted: falsetreatedbiggestbenefitdrivingStudiesminimumperhapsmorningsellingis usedreversevariant role=\"missingachievepromotestudentsomeoneextremerestorebottom:evolvedall thesitemapenglishway to AugustsymbolsCompanymattersmusicalagainstserving})();\r\npaymenttroubleconceptcompareparentsplayersregionsmonitor ''The winningexploreadaptedGalleryproduceabilityenhancecareers). The collectSearch ancientexistedfooter handlerprintedconsoleEasternexportswindowsChannelillegalneutralsuggest_headersigning.html\">settledwesterncausing-webkitclaimedJusticechaptervictimsThomas mozillapromisepartieseditionoutside:false,hundredOlympic_buttonauthorsreachedchronicdemandssecondsprotectadoptedprepareneithergreatlygreateroverallimprovecommandspecialsearch.worshipfundingthoughthighestinsteadutilityquarterCulturetestingclearlyexposedBrowserliberal} catchProjectexamplehide();FloridaanswersallowedEmperordefenseseriousfreedomSeveral-buttonFurtherout of != nulltrainedDenmarkvoid(0)/all.jspreventRequestStephen\n\nWhen observe
P6P5Q\u0002P5P4Q\u0000Q\u0003P3P8Q\u0005Q\u0001P;Q\u0003Q\u0007P0P5Q\u0001P5P9Q\u0007P0Q\u0001P2Q\u0001P5P3P4P0P P>Q\u0001Q\u0001P8Q\u000FP\u001CP>Q\u0001P:P2P5P4Q\u0000Q\u0003P3P8P5P3P>Q\u0000P>P4P0P2P>P?Q\u0000P>Q\u0001P4P0P=P=Q\u000BQ\u0005P4P>P;P6P=Q\u000BP8P P P2P>P3P>P?P>P Q\tP8Q\u0001P0P9Q\u0002P>P2P?P>Q\u0007P5P Q\tQ\u000CP4P>P;P6P=P>Q\u0001Q\u0001Q\u000BP;P:P8P1Q\u000BQ\u0001Q\u0002Q\u0000P>P4P0P=P=Q\u000BP5P P3P8P5P?Q\u0000P>P5P:Q\u0002P!P5P9Q\u0007P0Q\u0001P P4P5P;P8Q\u0002P0P:P>P3P>P>P=P;P0P9P=P3P>Q\u0000P>P4P5P2P5Q\u0000Q\u0001P8Q\u000FQ\u0001Q\u0002Q\u0000P0P=P5Q\u0004P8P;Q\u000CPQ\u0002Q\u0003P0P?Q\u0000P5P;Q\u000FP2P>P>P1Q\tP5P>P4P=P>P3P>Q\u0001P2P>P5P3P>Q\u0001Q\u0002P0Q\u0002Q\u000CP8P4Q\u0000Q\u0003P3P>P9Q\u0004P>Q\u0000Q\u0003P
P
P2P=Q\u000FQ\u0000P0P7P=Q\u000BQ\u0005P8Q\u0001P:P0Q\u0002Q\u000CP=P5P4P5P;Q\u000EQ\u000FP=P2P0Q\u0000Q\u000FP
investigationfavicon.ico\" margin-right:based on the Massachusettstable border=internationalalso known aspronunciationbackground:#fpadding-left:For example, miscellaneous</math>psychologicalin particularearch\" type=\"form method=\"as opposed toSupreme Courtoccasionally Additionally,North Americapx;backgroundopportunitiesEntertainment.toLowerCase(manufacturingprofessional combined withFor instance,consisting of\" maxlength=\"return false;consciousnessMediterraneanextraordinaryassassinationsubsequently button type=\"the number ofthe original comprehensiverefers to the