Apparatus and methods are provided for encoding independently decodable
pieces of compressed data to accommodate reordering of the pieces of
compressed data before or after manipulation. Encoding can occur before
or after manipulation of the source information. For example, in the
context of a JPEG image, MCUs can be rotated and promptly compressed with
restart markers without extra buffering to put the MCUs in the correct
rotated order. Later, the order of the independently decodable pieces can
be changed to accommodate proper output. Alternatively, pointers to the
independently decodable pieces can be used to present the data to the
decoder in the proper order. Additional reentry information within the
independently decodable pieces of compressed data can allow initiation of
decoding at other than the independently decodable points. Such reentry
information preferably would include bit-level pointers and sufficient
state information to initialize the decoder properly. For example, in the
context of a JPEG image, in addition to the typical information available
to the decoder that has been passed in earlier markers, the reentry
information for a given MCU boundary may include: a bit-level pointer to
the first block's DC Huffman code, the position of the output, and a DC
predictor for each component of the MCU.