updates to document and text_compressor