A compressed-code generating method that is used for compressing
information on characters including numerical data, sound and images, and
a compressed-code expanding method that is used for restoring and
expanding the compressed code generated by using the compressed-code
generating method to the original information. Bit strings {y}.sub.1 and
{y}.sub.2 are obtained respectively from a bit string {y} of information
to be compressed. A reversible loop that exists in chaos is operated to
these obtained bit strings, thereby to execute a reversible
compression/expansion of the information using the chaos.