Fix occur indexing not to skip last chunk.
Initial attempt at optimizing chunk access.
More attempts to optimize decoding.
Merge remote-tracking branch 'origin/chunk-opt' into chunk-opt