For data compressed using the first compression method that includes codewords generated by variable length coding sets of quantized transform coefficients using a first variable length coding method, decoding the codewords to create ordered sets of quantized transform coefficients, each created set forming an ordered series of quantized transform coefficients, and re-encoding the created ordered sets of quantized transform coefficients using a second variable length coding method to produce a re-coded set of codewords. The second variable length coding method produces shorter codewords, on average, than the first variable length coding method. The decoding and re-encoding is a lossless process such that no additional quantization or other errors are introduced to the received data by the method.