Actually, no. There will be multiple CompressTask objects constructed, and I don't want to incur the cost of constructing a brand new ChunkEncoder (with its hash table) for each block. This ThreadLocal helps the GC by re-using all data structures.

The requested ChunkEncoder should be the best available on the running platform (according to ChunkEncoderFactory), so I didn't see it necessary to allow the user to choose its implementation.