Skip to content

Instantly share code, notes, and snippets.

@irrationalRock
Created April 22, 2018 21:32
Show Gist options
  • Save irrationalRock/d3a4b26b4fc07e9c5c001e8c2bb16dde to your computer and use it in GitHub Desktop.
Save irrationalRock/d3a4b26b4fc07e9c5c001e8c2bb16dde to your computer and use it in GitHub Desktop.
non-vector.c comes from here
/* Stores the hash of the next 4 bytes and re-roots the binary tree at the
current sequence, without returning any matches.
REQUIRES: ix + MAX_TREE_COMP_LENGTH <= end-of-current-block */
static BROTLI_INLINE void FN(Store)(HasherHandle handle, const uint8_t* data,
const size_t mask, const size_t ix) {
HashToBinaryTree* self = FN(Self)(handle);
/* Maximum distance is window size - 16, see section 9.1. of the spec. */
const size_t max_backward = self->window_mask_ - BROTLI_WINDOW_GAP + 1;
FN(StoreAndFindMatches)(self, data, ix, mask, MAX_TREE_COMP_LENGTH,
max_backward, NULL, NULL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment