Patent ID: 6871320

Claim:
A data compressing apparatus generating code data from a character train stream constructed by a structured document including tags as identification information for expressing a document structure, comprising: a tag information separating unit separating the identified tags from the character train stream and outputting the separated identified tags as a tag information stream; a tag code replacing unit arranging a tag code for identification to a position of the character train stream from which the identified tags were separated by the tag information separating unit and outputting a tag replaced character train stream; a character train coding unit coding the tag replaced character train stream including the tag code outputted from the tag code replacing unit and outputting a code stream; a tag information storing unit storing the tag information stream separated by the tag information separating unit; a code storing unit storing the code stream formed by the character train coding unit; and a code switching unit alternately selecting the tag information stream stored in the tag information storing unit and the code stream stored in the code storing unit and outputting the selected stream.