Make TODO entries copybara-reversible.
This change allows both automated copybara export and import.
diff --git a/c/common/platform.h b/c/common/platform.h
index 7e5807d..729e57c 100644
--- a/c/common/platform.h
+++ b/c/common/platform.h
@@ -485,11 +485,11 @@
#define BROTLI_DUMP() (void)(0)
#endif
-/* TODO: add appropriate icc/sunpro/arm/ibm/ti checks. */
+/* TODO(emXozP): add appropriate icc/sunpro/arm/ibm/ti checks. */
#if (BROTLI_GNUC_VERSION_CHECK(3, 0, 0) || defined(__llvm__)) && \
!defined(BROTLI_BUILD_NO_RBIT)
#if defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8_ANY)
-/* TODO: detect ARMv6T2 and enable this code for it. */
+/* TODO(emXozP): detect ARMv6T2 and enable this code for it. */
static BROTLI_INLINE brotli_reg_t BrotliRBit(brotli_reg_t input) {
brotli_reg_t output;
__asm__("rbit %0, %1\n" : "=r"(output) : "r"(input));
diff --git a/c/common/shared_dictionary.c b/c/common/shared_dictionary.c
index 20ba73a..61f5877 100644
--- a/c/common/shared_dictionary.c
+++ b/c/common/shared_dictionary.c
@@ -416,7 +416,7 @@
BrotliSharedDictionary already contains data, compound dictionaries
will be appended, but an error will be returned if it already has
custom words or transforms.
- TODO: link to RFC for shared brotli once published. */
+ TODO(l7yr): link to RFC for shared brotli once published. */
static BROTLI_BOOL DecodeSharedDictionary(
const uint8_t* encoded, size_t size, BrotliSharedDictionary* dict) {
uint32_t num_prefix = 0;
@@ -492,7 +492,7 @@
return 0;
}
- /* TODO: explicitly initialize all the fields? */
+ /* TODO(emXozP): explicitly initialize all the fields? */
memset(dict, 0, sizeof(BrotliSharedDictionary));
dict->context_based = BROTLI_FALSE;
diff --git a/c/dec/decode.c b/c/dec/decode.c
index 7370daa..8e8b622 100644
--- a/c/dec/decode.c
+++ b/c/dec/decode.c
@@ -1356,7 +1356,7 @@
static BrotliDecoderErrorCode BROTLI_NOINLINE CopyUncompressedBlockToOutput(
size_t* available_out, uint8_t** next_out, size_t* total_out,
BrotliDecoderState* s) {
- /* TODO: avoid allocation for single uncompressed block. */
+ /* TODO(emXozP): avoid allocation for single uncompressed block. */
if (!BrotliEnsureRingBuffer(s)) {
return BROTLI_FAILURE(BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1);
}
diff --git a/c/enc/block_splitter.c b/c/enc/block_splitter.c
index 580f228..b24e1fb 100644
--- a/c/enc/block_splitter.c
+++ b/c/enc/block_splitter.c
@@ -170,7 +170,7 @@
kCommandStrideLength, kCommandBlockSwitchCost, params,
insert_and_copy_split);
if (BROTLI_IS_OOM(m)) return;
- /* TODO: reuse for distances? */
+ /* TODO(emXozP): reuse for distances? */
BROTLI_FREE(m, insert_and_copy_codes);
}
@@ -197,7 +197,6 @@
}
}
-
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/c/enc/block_splitter_inc.h b/c/enc/block_splitter_inc.h
index 0abc2f5..8e90b26 100644
--- a/c/enc/block_splitter_inc.h
+++ b/c/enc/block_splitter_inc.h
@@ -234,7 +234,7 @@
uint32_t* BROTLI_RESTRICT const remap = u32 + 3 * HISTOGRAMS_PER_BATCH;
uint32_t* BROTLI_RESTRICT const block_lengths =
u32 + 4 * HISTOGRAMS_PER_BATCH;
- /* TODO: move to arena? */
+ /* TODO(emXozP): move to arena? */
HistogramType* tmp = BROTLI_ALLOC(m, HistogramType, 2);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(histogram_symbols) ||
@@ -335,7 +335,7 @@
FN(HistogramAdd)(tmp, data[pos++]);
}
/* Among equally good histograms prefer last used. */
- /* TODO: should we give a block-switch discount here? */
+ /* TODO(emXozP): should we give a block-switch discount here? */
best_out = (i == 0) ? histogram_symbols[0] : histogram_symbols[i - 1];
best_bits = FN(BrotliHistogramBitCostDistance)(
tmp, &all_histograms[best_out], tmp + 1);
diff --git a/c/enc/brotli_bit_stream.c b/c/enc/brotli_bit_stream.c
index a89aad9..039d576 100644
--- a/c/enc/brotli_bit_stream.c
+++ b/c/enc/brotli_bit_stream.c
@@ -286,7 +286,7 @@
/* Write the Huffman tree into the brotli-representation.
The command alphabet is the largest, so this allocation will fit all
alphabets. */
- /* TODO: fix me */
+ /* TODO(emXozP): fix me */
uint8_t huffman_tree[BROTLI_NUM_COMMAND_SYMBOLS];
uint8_t huffman_tree_extra_bits[BROTLI_NUM_COMMAND_SYMBOLS];
size_t huffman_tree_size = 0;
@@ -778,7 +778,7 @@
++length_histo[BlockLengthPrefixCode(lengths[i])];
}
StoreVarLenUint8(num_types - 1, storage_ix, storage);
- if (num_types > 1) { /* TODO: else? could StoreBlockSwitch occur? */
+ if (num_types > 1) { /* TODO(emXozP): else? could StoreBlockSwitch occur? */
BuildAndStoreHuffmanTree(&type_histo[0], num_types + 2, num_types + 2, tree,
&code->type_depths[0], &code->type_bits[0],
storage_ix, storage);
@@ -1150,12 +1150,12 @@
}
}
-/* TODO: pull alloc/dealloc to caller? */
+/* TODO(emXozP): pull alloc/dealloc to caller? */
typedef struct MetablockArena {
HistogramLiteral lit_histo;
HistogramCommand cmd_histo;
HistogramDistance dist_histo;
- /* TODO: merge bits and depth? */
+ /* TODO(emXozP): merge bits and depth? */
uint8_t lit_depth[BROTLI_NUM_LITERAL_SYMBOLS];
uint16_t lit_bits[BROTLI_NUM_LITERAL_SYMBOLS];
uint8_t cmd_depth[BROTLI_NUM_COMMAND_SYMBOLS];
diff --git a/c/enc/cluster_inc.h b/c/enc/cluster_inc.h
index 00b3539..e3cad3b 100644
--- a/c/enc/cluster_inc.h
+++ b/c/enc/cluster_inc.h
@@ -228,7 +228,7 @@
++next_index;
}
}
- /* TODO: by using idea of "cycle-sort" we can avoid allocation of
+ /* TODO(emXozP): by using idea of "cycle-sort" we can avoid allocation of
tmp and reduce the number of copying by the factor of 2. */
tmp = BROTLI_ALLOC(m, HistogramType, next_index);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tmp)) return 0;
@@ -259,7 +259,7 @@
size_t pairs_capacity = max_input_histograms * max_input_histograms / 2;
/* For the first pass of clustering, we allow all pairs. */
HistogramPair* pairs = BROTLI_ALLOC(m, HistogramPair, pairs_capacity + 1);
- /* TODO: move to "persistent" arena? */
+ /* TODO(emXozP): move to "persistent" arena? */
HistogramType* tmp = BROTLI_ALLOC(m, HistogramType, 1);
size_t i;
diff --git a/c/enc/compound_dictionary.c b/c/enc/compound_dictionary.c
index 10f76b2..4ef8819 100644
--- a/c/enc/compound_dictionary.c
+++ b/c/enc/compound_dictionary.c
@@ -52,7 +52,7 @@
next_bucket = (uint32_t*)(&bucket_heads[num_buckets]);
memset(num, 0, num_buckets * sizeof(num[0]));
- /* TODO: apply custom "store" order. */
+ /* TODO(emXozP): apply custom "store" order. */
for (i = 0; i + 7 < source_size; ++i) {
const uint64_t h = (BROTLI_UNALIGNED_LOAD64LE(&source[i]) & hash_mask) *
kPreparedDictionaryHashMul64Long;
diff --git a/c/enc/compress_fragment.c b/c/enc/compress_fragment.c
index 064c858..58fe262 100644
--- a/c/enc/compress_fragment.c
+++ b/c/enc/compress_fragment.c
@@ -130,7 +130,7 @@
uint16_t* const bits = s->cmd_bits;
uint8_t* BROTLI_RESTRICT const tmp_depth = s->tmp_depth;
uint16_t* BROTLI_RESTRICT const tmp_bits = s->tmp_bits;
- /* TODO: do only once on initialization. */
+ /* TODO(emXozP): do only once on initialization. */
memset(tmp_depth, 0, BROTLI_NUM_COMMAND_SYMBOLS);
BrotliCreateHuffmanTree(histogram, 64, 15, s->tree, depth);
@@ -168,7 +168,7 @@
tmp_depth[256 + 8 * i] = depth[48 + i];
tmp_depth[448 + 8 * i] = depth[56 + i];
}
- /* TODO: could/should full-length machinery be avoided? */
+ /* TODO(emXozP): could/should full-length machinery be avoided? */
BrotliStoreHuffmanTree(
tmp_depth, BROTLI_NUM_COMMAND_SYMBOLS, s->tree, storage_ix, storage);
}
diff --git a/c/enc/compress_fragment_two_pass.c b/c/enc/compress_fragment_two_pass.c
index 127519b..e88b44e 100644
--- a/c/enc/compress_fragment_two_pass.c
+++ b/c/enc/compress_fragment_two_pass.c
@@ -69,7 +69,7 @@
size_t* storage_ix,
uint8_t* storage) {
/* Tree size for building a tree over 64 symbols is 2 * 64 + 1. */
- /* TODO: initialize once. */
+ /* TODO(emXozP): initialize once. */
memset(s->tmp_depth, 0, sizeof(s->tmp_depth));
BrotliCreateHuffmanTree(s->cmd_histo, 64, 15, s->tmp_tree, s->cmd_depth);
BrotliCreateHuffmanTree(&s->cmd_histo[64], 64, 14, s->tmp_tree,
@@ -472,9 +472,9 @@
size_t i;
memset(s->lit_histo, 0, sizeof(s->lit_histo));
- /* TODO: is that necessary? */
+ /* TODO(emXozP): is that necessary? */
memset(s->cmd_depth, 0, sizeof(s->cmd_depth));
- /* TODO: is that necessary? */
+ /* TODO(emXozP): is that necessary? */
memset(s->cmd_bits, 0, sizeof(s->cmd_bits));
memset(s->cmd_histo, 0, sizeof(s->cmd_histo));
for (i = 0; i < num_literals; ++i) {
diff --git a/c/enc/compress_fragment_two_pass.h b/c/enc/compress_fragment_two_pass.h
index f868f83..6a02180 100644
--- a/c/enc/compress_fragment_two_pass.h
+++ b/c/enc/compress_fragment_two_pass.h
@@ -22,7 +22,7 @@
extern "C" {
#endif
-/* TODO: turn to macro. */
+/* TODO(emXozP): turn to macro. */
static const size_t kCompressFragmentTwoPassBlockSize = 1 << 17;
typedef struct BrotliTwoPassArena {
diff --git a/c/enc/encode.c b/c/enc/encode.c
index 3076e66..220203f 100644
--- a/c/enc/encode.c
+++ b/c/enc/encode.c
@@ -138,7 +138,7 @@
BrotliEncoderState* state, BrotliEncoderParameter p, uint32_t value) {
/* Changing parameters on the fly is not implemented yet. */
if (state->is_initialized_) return BROTLI_FALSE;
- /* TODO: Validate/clamp parameters here. */
+ /* TODO(emXozP): Validate/clamp parameters here. */
switch (p) {
case BROTLI_PARAM_MODE:
state->params.mode = (BrotliEncoderMode)value;
@@ -274,7 +274,7 @@
}
}
-/* TODO: move to compress_fragment.c? */
+/* TODO(emXozP): move to compress_fragment.c? */
/* Initializes the command and distance prefix codes for the first block. */
static void InitCommandPrefixCodes(BrotliOnePassArena* s) {
static const uint8_t kDefaultCommandDepths[128] = {
@@ -506,7 +506,7 @@
static BROTLI_BOOL ShouldCompress(
const uint8_t* data, const size_t mask, const uint64_t last_flush_pos,
const size_t bytes, const size_t num_literals, const size_t num_commands) {
- /* TODO: find more precise minimal block overhead. */
+ /* TODO(emXozP): find more precise minimal block overhead. */
if (bytes <= 2) return BROTLI_FALSE;
if (num_commands < (bytes >> 8) + 2) {
if ((double)num_literals > 0.99 * (double)bytes) {
@@ -606,7 +606,7 @@
size_t num_literal_contexts = 1;
const uint32_t* literal_context_map = NULL;
if (!params->disable_literal_context_modeling) {
- /* TODO: pull to higher level and reuse. */
+ /* TODO(emXozP): pull to higher level and reuse. */
uint32_t* arena = BROTLI_ALLOC(m, uint32_t, 14 * 32);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(arena)) return;
DecideOverLiteralContextModeling(
@@ -1136,7 +1136,7 @@
const size_t max_commands = max_length / 8;
const size_t processed_bytes = (size_t)(s->input_pos_ - s->last_flush_pos_);
/* If maximal possible additional block doesn't fit metablock, flush now. */
- /* TODO: Postpone decision until next block arrives? */
+ /* TODO(emXozP): Postpone decision until next block arrives? */
const BROTLI_BOOL next_input_fits_metablock = TO_BROTLI_BOOL(
processed_bytes + InputBlockSize(s) <= max_length);
/* If block splitting is not used, then flush as soon as there is some
@@ -1337,7 +1337,7 @@
allocation here and not before the loop, because if the input is small,
this will be allocated after the Zopfli cost model is freed, so this
will not increase peak memory usage.
- TODO: If the first allocation is too small, increase command
+ TODO(emXozP): If the first allocation is too small, increase command
buffer size exponentially. */
new_cmd_alloc_size = BROTLI_MAX(size_t, expected_num_commands,
num_commands + path_size + 1);
@@ -1540,7 +1540,7 @@
return BROTLI_TRUE;
}
if (quality == 10) {
- /* TODO: Implement this direct path for all quality levels. */
+ /* TODO(emXozP): Implement this direct path for all quality levels. */
const int lg_win = BROTLI_MIN(int, BROTLI_LARGE_MAX_WINDOW_BITS,
BROTLI_MAX(int, 16, lgwin));
int ok = BrotliCompressBufferQuality10(lg_win, input_size, input_buffer,
diff --git a/c/enc/encoder_dict.c b/c/enc/encoder_dict.c
index 81c4518..d4a2ad5 100644
--- a/c/enc/encoder_dict.c
+++ b/c/enc/encoder_dict.c
@@ -367,7 +367,7 @@
/* The order of the loops is such that in case of collision, words with
shorter length are preferred, and in case of same length, words with
smaller index. There is only a single word per bucket. */
- /* TODO: consider adding optional user-supplied frequency_map to use
+ /* TODO(l7yr): consider adding optional user-supplied frequency_map to use
for preferred words instead, this can make the encoder better for
quality 9 and below without affecting the decoder */
memset(hash_table_words, 0, sizeof(kStaticDictionaryHashWords));
@@ -424,7 +424,7 @@
((cutoffTransforms >> (N * 6)) & 0x3F), so for example the identity
transform code must be 0-63, for N=1 the transform code must be 4-67, ...,
for N=9 it must be 36-99.
- TODO: consider a simple flexible uint8_t[10] instead of the uint64_t
+ TODO(l7yr): consider a simple flexible uint8_t[10] instead of the uint64_t
for the cutoff transforms, so that shared dictionaries can have the
OmitLast transforms anywhere without loss. */
*count = 0;
@@ -501,7 +501,7 @@
dict->max_quality = BROTLI_MAX_QUALITY;
}
-/* TODO: make sure that tooling will warn user if not all the cutoff
+/* TODO(emXozP): make sure that tooling will warn user if not all the cutoff
transforms are available (for low-quality encoder). */
static BROTLI_BOOL InitCustomSharedEncoderDictionary(
MemoryManager* m, const BrotliSharedDictionary* decoded_dict,
diff --git a/c/enc/hash_composite_inc.h b/c/enc/hash_composite_inc.h
index 0941550..c9c0fe6 100644
--- a/c/enc/hash_composite_inc.h
+++ b/c/enc/hash_composite_inc.h
@@ -48,7 +48,7 @@
self->hb_common = *self->common;
self->fresh = BROTLI_TRUE;
self->params = params;
- /* TODO: Initialize of the hashers is deferred to Prepare (and params
+ /* TODO(l7yr): Initialize of the hashers is deferred to Prepare (and params
remembered here) because we don't get the one_shot and input_size params
here that are needed to know the memory size of them. Instead provide
those params to all hashers FN(Initialize) */
diff --git a/c/enc/histogram.c b/c/enc/histogram.c
index 8cb7610..8428883 100644
--- a/c/enc/histogram.c
+++ b/c/enc/histogram.c
@@ -63,7 +63,7 @@
BlockSplitIteratorNext(&insert_and_copy_it);
HistogramAddCommand(&insert_and_copy_histograms[insert_and_copy_it.type_],
cmd->cmd_prefix_);
- /* TODO: unwrap iterator blocks. */
+ /* TODO(emXozP): unwrap iterator blocks. */
for (j = cmd->insert_len_; j != 0; --j) {
size_t context;
BlockSplitIteratorNext(&literal_it);
diff --git a/c/enc/params.h b/c/enc/params.h
index 9c26d30..9e01419 100644
--- a/c/enc/params.h
+++ b/c/enc/params.h
@@ -40,7 +40,7 @@
BROTLI_BOOL large_window;
BrotliHasherParams hasher;
BrotliDistanceParams dist;
- /* TODO: rename to BrotliShared... */
+ /* TODO(emXozP): rename to BrotliShared... */
SharedEncoderDictionary dictionary;
} BrotliEncoderParams;
diff --git a/c/enc/static_dict.c b/c/enc/static_dict.c
index 04a852b..fea3801 100644
--- a/c/enc/static_dict.c
+++ b/c/enc/static_dict.c
@@ -527,7 +527,7 @@
uint32_t skipdist = (uint32_t)((uint32_t)(1 << dictionary->words->
size_bits_by_length[len_code]) & ~1u) *
(uint32_t)dictionary->num_transforms;
- /* TODO: check for dist overflow */
+ /* TODO(l7yr): check for dist overflow */
dist += skipdist;
AddMatch(dist, (size_t)l, len_code, matches);
}
diff --git a/c/include/brotli/encode.h b/c/include/brotli/encode.h
index 72668e1..4968d99 100644
--- a/c/include/brotli/encode.h
+++ b/c/include/brotli/encode.h
@@ -479,7 +479,6 @@
BROTLI_ENC_API const uint8_t* BrotliEncoderTakeOutput(
BrotliEncoderState* state, size_t* size);
-
/**
* Gets an encoder library version.
*
diff --git a/c/tools/brotli.c b/c/tools/brotli.c
index 049371c..86debe4 100644
--- a/c/tools/brotli.c
+++ b/c/tools/brotli.c
@@ -664,7 +664,7 @@
}
/* Copy file times and permissions.
- TODO: this is a "best effort" implementation; honest cross-platform
+ TODO(emXozP): this is a "best effort" implementation; honest cross-platform
fully featured implementation is way too hacky; add more hacks by request. */
static void CopyStat(const char* input_path, const char* output_path) {
struct stat statbuf;
diff --git a/go/cbrotli/writer.go b/go/cbrotli/writer.go
index 9fa75ab..9fe6946 100644
--- a/go/cbrotli/writer.go
+++ b/go/cbrotli/writer.go
@@ -108,7 +108,7 @@
if length != 0 {
// It is a workaround for non-copying-wrapping of native memory.
// C-encoder never pushes output block longer than ((2 << 25) + 502).
- // TODO: use natural wrapper, when it becomes available, see
+ // TODO(emXozP): use natural wrapper, when it becomes available, see
// https://golang.org/issue/13656.
output := (*[1 << 30]byte)(unsafe.Pointer(result.output_data))[:length:length]
_, err = w.dst.Write(output)
diff --git a/java/org/brotli/dec/Decode.java b/java/org/brotli/dec/Decode.java
index f5dbeae..9826443 100644
--- a/java/org/brotli/dec/Decode.java
+++ b/java/org/brotli/dec/Decode.java
@@ -88,7 +88,7 @@
0x020000, 0x020004, 0x020003, 0x030002, 0x020000, 0x020004, 0x020003, 0x040005
};
- // TODO: generalize.
+ // TODO(emXozP): generalize.
static final int MAX_TRANSFORMED_WORD_LENGTH = 5 + 24 + 8;
private static final int MAX_DISTANCE_BITS = 24;
@@ -152,7 +152,7 @@
return NUM_DISTANCE_SHORT_CODES + ndirect + 2 * (maxndistbits << npostfix);
}
- // TODO: add a correctness test for this function when
+ // TODO(emXozP): add a correctness test for this function when
// large-window and dictionary are implemented.
private static int calculateDistanceAlphabetLimit(int maxDistance, int npostfix, int ndirect) {
if (maxDistance < ndirect + (2 << npostfix)) {
@@ -265,7 +265,7 @@
s.isLargeWindow = 1;
}
- // TODO: do we need byte views?
+ // TODO(emXozP): do we need byte views?
static void attachDictionaryChunk(State s, byte[] data) {
if (s.runningState != INITIALIZED) {
throw new IllegalStateException("State MUST be freshly initialized");
@@ -485,7 +485,7 @@
if (space != 0) {
throw new BrotliRuntimeException("Unused space"); // COV_NF_LINE
}
- // TODO: Pass max_symbol to Huffman table builder instead?
+ // TODO(emXozP): Pass max_symbol to Huffman table builder instead?
Utils.fillIntsWithZeroes(codeLengths, symbol, numSymbols);
}
@@ -504,7 +504,7 @@
*/
private static int readSimpleHuffmanCode(int alphabetSizeMax, int alphabetSizeLimit,
int[] tableGroup, int tableIdx, State s) {
- // TODO: Avoid allocation?
+ // TODO(emXozP): Avoid allocation?
int[] codeLengths = new int[alphabetSizeLimit];
int[] symbols = new int[4];
@@ -560,7 +560,7 @@
break;
}
- // TODO: Use specialized version?
+ // TODO(emXozP): Use specialized version?
return Huffman.buildHuffmanTable(
tableGroup, tableIdx, HUFFMAN_TABLE_BITS, codeLengths, alphabetSizeLimit);
}
@@ -568,7 +568,7 @@
// Decode Huffman-coded code lengths.
private static int readComplexHuffmanCode(int alphabetSizeLimit, int skip,
int[] tableGroup, int tableIdx, State s) {
- // TODO: Avoid allocation?
+ // TODO(emXozP): Avoid allocation?
int[] codeLengths = new int[alphabetSizeLimit];
int[] codeLengthCodeLengths = new int[CODE_LENGTH_CODES];
int space = 32;
@@ -577,7 +577,7 @@
int codeLenIdx = CODE_LENGTH_CODE_ORDER[i];
BitReader.fillBitWindow(s);
int p = BitReader.peekBits(s) & 15;
- // TODO: Demultiplex FIXED_TABLE.
+ // TODO(emXozP): Demultiplex FIXED_TABLE.
s.bitOffset += FIXED_TABLE[p] >> 16;
int v = FIXED_TABLE[p] & 0xFFFF;
codeLengthCodeLengths[codeLenIdx] = v;
@@ -709,7 +709,7 @@
private static void maybeReallocateRingBuffer(State s) {
int newSize = s.maxRingBufferSize;
if (newSize > s.expectedTotalSize) {
- /* TODO: Handle 2GB+ cases more gracefully. */
+ /* TODO(emXozP): Handle 2GB+ cases more gracefully. */
int minimalNewSize = s.expectedTotalSize;
while ((newSize >> 1) > minimalNewSize) {
newSize >>= 1;
@@ -736,7 +736,7 @@
s.runningState = INIT_WRITE;
return;
}
- // TODO: Reset? Do we need this?
+ // TODO(emXozP): Reset? Do we need this?
s.literalTreeGroup = new int[0];
s.commandTreeGroup = new int[0];
s.distanceTreeGroup = new int[0];
@@ -831,7 +831,7 @@
BitReader.fillBitWindow(s);
s.distancePostfixBits = BitReader.readFewBits(s, 2);
s.numDirectDistanceCodes = BitReader.readFewBits(s, 4) << s.distancePostfixBits;
- // TODO: Reuse?
+ // TODO(emXozP): Reuse?
s.contextModes = new byte[s.numLiteralBlockTypes];
for (int i = 0; i < s.numLiteralBlockTypes;) {
/* Ensure that less than 256 bits read between readMoreInput. */
@@ -843,7 +843,7 @@
BitReader.readMoreInput(s);
}
- // TODO: Reuse?
+ // TODO(emXozP): Reuse?
s.contextMap = new byte[s.numLiteralBlockTypes << LITERAL_CONTEXT_BITS];
int numLiteralTrees = decodeContextMap(s.numLiteralBlockTypes << LITERAL_CONTEXT_BITS,
s.contextMap, s);
@@ -855,7 +855,7 @@
}
}
- // TODO: Reuse?
+ // TODO(emXozP): Reuse?
s.distContextMap = new byte[s.numDistanceBlockTypes << DISTANCE_CONTEXT_BITS];
int numDistTrees = decodeContextMap(s.numDistanceBlockTypes << DISTANCE_CONTEXT_BITS,
s.distContextMap, s);
@@ -1091,7 +1091,7 @@
byte[] ringBuffer = s.ringBuffer;
while (s.runningState != FINISHED) {
- // TODO: extract cases to methods for the better readability.
+ // TODO(emXozP): extract cases to methods for the better readability.
switch (s.runningState) {
case BLOCK_START:
if (s.metaBlockLength < 0) {
diff --git a/java/org/brotli/dec/Huffman.java b/java/org/brotli/dec/Huffman.java
index 38f7f29..1717be5 100644
--- a/java/org/brotli/dec/Huffman.java
+++ b/java/org/brotli/dec/Huffman.java
@@ -66,7 +66,7 @@
int tableOffset = tableGroup[tableIdx];
int key; // Reversed prefix code.
int[] sorted = new int[codeLengthsSize]; // Symbols sorted by code length.
- // TODO: fill with zeroes?
+ // TODO(emXozP): fill with zeroes?
int[] count = new int[MAX_LENGTH + 1]; // Number of codes of each length.
int[] offset = new int[MAX_LENGTH + 1]; // Offsets in sorted table for each length.
int symbol;
diff --git a/java/org/brotli/enc/PreparedDictionaryGenerator.java b/java/org/brotli/enc/PreparedDictionaryGenerator.java
index 1257b92..a002c76 100644
--- a/java/org/brotli/enc/PreparedDictionaryGenerator.java
+++ b/java/org/brotli/enc/PreparedDictionaryGenerator.java
@@ -73,7 +73,7 @@
accumulator |= (src.get(i) & 0xFFL) << (8 * i);
}
accumulator <<= 8;
- /* TODO: apply custom "store" order. */
+ /* TODO(emXozP): apply custom "store" order. */
for (int i = 0; i + 7 < sourceSize; ++i) {
accumulator = (accumulator >>> 8) | ((src.get(i + 7) & 0xFFL) << 56);
long h = (accumulator & hashMask) * HASH_MULTIPLIER;
diff --git a/java/org/brotli/wrapper/dec/BUILD b/java/org/brotli/wrapper/dec/BUILD
index 7a99e98..cf3c2a3 100644
--- a/java/org/brotli/wrapper/dec/BUILD
+++ b/java/org/brotli/wrapper/dec/BUILD
@@ -7,7 +7,7 @@
srcs = [
"decoder_jni.cc",
"decoder_jni.h",
- # TODO: investigate, why this prevents JNI library loading.
+ # TODO(emXozP): investigate, why this prevents JNI library loading.
#"decoder_jni_onload.cc",
],
)
diff --git a/java/org/brotli/wrapper/dec/DecoderJNI.java b/java/org/brotli/wrapper/dec/DecoderJNI.java
index fc5225d..0762106 100644
--- a/java/org/brotli/wrapper/dec/DecoderJNI.java
+++ b/java/org/brotli/wrapper/dec/DecoderJNI.java
@@ -126,7 +126,7 @@
@Override
protected void finalize() throws Throwable {
if (context[0] != 0) {
- /* TODO: log resource leak? */
+ /* TODO(emXozP): log resource leak? */
destroy();
}
super.finalize();
diff --git a/java/org/brotli/wrapper/dec/decoder_jni.cc b/java/org/brotli/wrapper/dec/decoder_jni.cc
index ba341a3..b3c42e7 100644
--- a/java/org/brotli/wrapper/dec/decoder_jni.cc
+++ b/java/org/brotli/wrapper/dec/decoder_jni.cc
@@ -79,7 +79,7 @@
}
if (ok) {
- /* TODO: future versions (e.g. when 128-bit architecture comes)
+ /* TODO(emXozP): future versions (e.g. when 128-bit architecture comes)
might require thread-safe cookie<->handle mapping. */
context[0] = reinterpret_cast<jlong>(handle);
} else if (!!handle) {
diff --git a/java/org/brotli/wrapper/enc/EncoderJNI.java b/java/org/brotli/wrapper/enc/EncoderJNI.java
index 1cbd7c1..83275c9 100644
--- a/java/org/brotli/wrapper/enc/EncoderJNI.java
+++ b/java/org/brotli/wrapper/enc/EncoderJNI.java
@@ -169,7 +169,7 @@
@Override
protected void finalize() throws Throwable {
if (context[0] != 0) {
- /* TODO: log resource leak? */
+ /* TODO(emXozP): log resource leak? */
destroy();
}
super.finalize();
diff --git a/java/org/brotli/wrapper/enc/encoder_jni.cc b/java/org/brotli/wrapper/enc/encoder_jni.cc
index 00fbfd8..2d7c3cb 100644
--- a/java/org/brotli/wrapper/enc/encoder_jni.cc
+++ b/java/org/brotli/wrapper/enc/encoder_jni.cc
@@ -93,7 +93,7 @@
}
if (ok) {
- /* TODO: future versions (e.g. when 128-bit architecture comes)
+ /* TODO(emXozP): future versions (e.g. when 128-bit architecture comes)
might require thread-safe cookie<->handle mapping. */
context[0] = reinterpret_cast<jlong>(handle);
} else if (!!handle) {
diff --git a/research/deorummolae.cc b/research/deorummolae.cc
index 27e06a6..8f88c7f 100644
--- a/research/deorummolae.cc
+++ b/research/deorummolae.cc
@@ -97,7 +97,7 @@
}
/* Build longest-common-prefix based on suffix array and text.
- TODO: borrowed -> unknown efficiency. */
+ TODO(emXozP): borrowed -> unknown efficiency. */
static void buildLcp(std::vector<TextChar>* text, std::vector<TextIdx>* sa,
std::vector<TextIdx>* lcp, std::vector<TextIdx>* invese_sa) {
TextIdx size = static_cast<TextIdx>(text->size());
diff --git a/research/dictionary_generator.cc b/research/dictionary_generator.cc
index c30e49b..b830786 100644
--- a/research/dictionary_generator.cc
+++ b/research/dictionary_generator.cc
@@ -219,7 +219,7 @@
}
} else if (arg1 == 's') {
sliceLen = readInt(arg2);
- // TODO: investigate why sliceLen == 4..5 greatly slows down
+ // TODO(emXozP): investigate why sliceLen == 4..5 greatly slows down
// durschlag engine, but only from command line;
// durschlag_runner seems to work fine with those.
if (sliceLen < 4 || sliceLen > 256) {
diff --git a/research/durchschlag.cc b/research/durchschlag.cc
index 9a98a50..467e8b0 100644
--- a/research/durchschlag.cc
+++ b/research/durchschlag.cc
@@ -401,7 +401,7 @@
std::vector<TextIdx> isa(total);
for (TextIdx i = 0; i < total; ++i) isa[sa[i]] = i;
- // TODO: borrowed -> unknown efficiency.
+ // TODO(emXozP): borrowed -> unknown efficiency.
std::vector<TextIdx> lcp(total);
TextIdx k = 0;
lcp[total - 1] = 0;