A method and system is disclosed for compressing a file comprising
computer markup language. Contents of a file containing markup language,
including a first and second markup language tag, are read. Data
corresponding to the first and second markup language tags is identified
and the first markup language tag, data and a placeholder are pushed onto
a stack. A method and system of decompressing the resulting compressed
document are also disclosed. The first markup language tag, data and
placeholder are popped off the stack, and the second markup language tag
corresponding to the first markup language tag is identified. The second
markup language tag corresponding to the first markup language tag is
generated, and the first markup language tag, data and second markup
language tag are stored in memory.