Note: Claims are shown in the official language in which they were submitted.
-12-
The embodiments of the invention in which an exclusive
property or privilege is claimed are defined as follows:
1. A data compression method for compressing an
input stream of data character signals into a stream of
compressed code signals, said data character signals
belonging to an alphabet of data character signals
containing [A] characters, characterized by:
(a) utilizing an associative memory having a
plurality of locations for storing strings of data
character signals, each location having a prefix code
field and a character field, each location having an
address associated therewith, the address providing a
compressed code signal for a stored string,
(b) initializing said memory to contain [A]
single character strings of said alphabet by nulling the
prefix code field of [A] locations of said memory and
inserting the data character signals of said alphabet into
the character fields of said [A] locations, respectively,
(c) utilizing a register having a code field and
a character field,
(d) nulling said code field of said register and
inserting an input data character into said character
field of said register,
(e) associatively comparing the contents of said
register with the contents of the locations of said memory
to determine a match therewith,
(f) if a match is determined, inserting the
address associated with the matched location into said
code field of said register and inserting a next data
character of said input stream into said character field
of said register,
(g) repeating steps (e) and (f) until no match is
determined, thereby finding the longest stored string in
said memory matching said input stream,
-13-
(h) when no match is determined in step (e),
providing the contents of said code field of said register
as a compressed code signal, thereby providing the
compressed code signal of said longest matched stored
string,
(i) writing the contents of said code field and
said character field of said register into the prefix code
field and the character field, respectively, of a next
empty location in said memory, thereby inserting into said
memory an extended string comprising said longest matched
stored string extended by the next following data
character signal in said input stream, the address of said
next empty location providing the compressed code signal
for said extended string inserted into said memory,
(j) nulling said code field of said register
after inserting said extended string into said memory, and
(k) repeating steps (e) through (j) until no
further input stream of data character signals is
available to be compressed.
2. The method of claim 1 further including
assigning sequential addresses for accessing sequential
empty locations of said memory for providing said next
empty location of step (i), said sequential addresses
beginning with [A]+1.
3. The method of claim 1 wherein said
initializing step further comprises:
inserting into the character fields of the
locations of said memory, except for said [A] locations,
an arbitrary bit pattern not recognized as one of the data
character signals of said alphabet.
4. The method of claim 1 further including a
data decompression method for decompressing said stream of
compressed code signals to recover said stream of input
data character signals corresponding thereto, wherein the
following steps (o) through (y) comprise a decompression
cycle, said data decompression method comprising:
-14-
(l) utilizing a decompression memory having a
plurality of locations for storing strings of data
character signals, each location having a prefix code
field and a character field, each location having an
address associated therewith, the address providing a
compressed code signal for a string stored in said
decompression memory,
(m) initializing said decompression memory to
contain [A] single character strings of said alphabet by
nulling the prefix code field of [A] locations of said
decompression memory and inserting the data character
signals of said alphabet into the character fields of said
[A] locations, respectively,
(n) utilizing an address register for accessing
said locations of said decompression memory,
(o) receiving a compressed code signal into an
input code register,
(p) transferring the contents of said input code
register to said address register,
(q) utilizing a prior code register for holding
the compressed code signal received in the decompression
cycle preceding a current decompression cycle,
(r) accessing the location of said decompression
memory corresponding to the contents of said address
register,
(s) inserting the contents of the character field
of the accessed location into a stack, thereby inserting
the data character signal in the character field of the
accessed location into said stack,
(t) inserting the contents of the prefix code
field of the accessed location into said address register,
(u) repeating steps (r) through (t) until the
contents of said address register is null, thereby
inserting into said stack the data character signals
corresponding to the received compressed code signal,
-15-
(v) inserting the address of a next empty
location into said address register,
(w) writing an update prefix code and an update
character into the prefix code field and the character
field, respectively, of the location of said decompression
memory accessed by said address register, the update
prefix code being provided by said prior code register,
the update character being provided by the last data
character signal inserted into said stack, thereby
inserting into said decompression memory an extended
string corresponding to the extending string inserted into
said associative memory, the address of said next empty
location providing the compressed code signal for said
extended string inserted into said decompression memory,
(x) outputting the contents of said stack,
thereby recovering the string of data character signals
corresponding to the received compressed code signal,
(y) transferring the received compressed code
signal in said input code register into said prior code
register,
(z) repeating steps (o) through (y) until no
further stream of compressed code signals is available to
be decompressed.
5. The method of claim 4 further including
assigning sequential addresses for accessing sequential
empty locations of said decompression memory, thereby
providing the address of said next empty location of step
(v), said sequential empty locations beginning with [A]+1.
6. The method of claim 4 wherein said outputting
step comprises outputting the data character signals from
said stack in an order reversed from the order in which
the data character signals were inserted into said stack.
7. The method of claim 4 wherein said data
decompression method includes an exception processing
method invoked when a received compressed code signal does
-16-
not have a corresponding string stored in said
decompression memory, said received compressed code signal
thereby being unrecognized, said exception processing
method comprising:
creating an exception extended string comprising
the string corresponding to the compressed code signal in
said prior code register extended by said update character,
outputting said exception extended string, thereby
outputting the string corresponding to said unrecognized
compressed code signal, and
storing said exception extended string in said
decompression memory, said unrecognized compressed code
signal providing the compressed code signal corresponding
to said stored exception extended string.
8. The method of claim 7 wherein said exception
processing method comprises:
inserting said update character into said stack,
transferring the contents of said prior code
register to said address register,
performing steps (r) through (x), thereby creating
said exception extended string, outputting said exception
extended string and storing said exception extended string
in said decompression memory with the address of step (v)
providing said unrecognized compressed code signal for
said exception extended string, and
continuing said decompression method with step (y).
9. The method of claim 8 wherein
steps (e) through (j) comprise a compression cycle,
and
said compression method includes performing a
current compression cycle following performing a prior
compression cycle, said compression method providing said
unrecognized compressed code signal when the compression
method in the current compression cycle provides the
compressed code signal of the extended string inserted
into said associative memory in step (i) of the prior
compression cycle.
-17-
10. The method of claim 8 further including:
utilizing an address counter for assigning
sequential addresses for accessing sequential empty
locations of said decompression memory, thereby providing
the address of said next empty location of step (v), said
sequential empty locations beginning with [A]+1,
invoking said exception processing method in
accordance with a comparison between a received compressed
code signal in said input code register and the contents
of said address counter.
11. Data compression apparatus for compressing an
input stream of data character signals into a stream of
compressed code signals, said data character signals
belonging to an alphabet of data character signals
containing [A] characters, characterized by:
(a) an associative memory having a plurality of
locations for storing strings of data character signals,
each location having a prefix code field and a character
field, each location having an address associated
therewith, the address providing a compressed code signal
for a stored string,
(b) means for initializing said memory to contain
[A] single character strings of said alphabet by nulling
the prefix code field of [A] locations of said memory and
inserting the data character signals of said alphabet into
the character fields of said [A] locations, respectively,
(c) a register having a code field and a
character field,
(d) means for nulling said code field of said
register and inserting an input data character into said
character field of said register,
(e) control means coupled to said memory and said
register for operating said memory for associatively
comparing the contents of said register with the contents
of the locations of said memory to determine a match
therewith,
-18-
(f) said control means being operative, if a
match is determined, for causing the address associated
with the matched location to be inserted into said code
field of said register and for causing a next data
character of said input stream to be inserted into said
character field of said register,
(g) said control means being operative to repeat
the operations of (e) and (f) until no match is
determined, thereby finding the longest stored string in
said memory matching said input stream,
(h) said control means being further operative
when no match is determined in (e), to provide the
contents of said code field of said register as a
compressed code signal, thereby providing the compressed
code signal of said longest matched stored string,
(i) said control means being further operative to
write the contents of said code field and said character
field of said register into the prefix code field and the
character field, respectively, of a next empty location in
said memory, thereby inserting into said memory an
extended string comprising said longest matched stored
string extended by the next following data character
signal in said input stream, the address of said next
empty location providing the compressed code signal for
said extended string inserted into said memory, and
(j) means for nulling said code field of said
register,
(k) said control means operative to repeat the
operations of (e) through (j) until no further input
stream of data character signals is available to be
compressed.
12. The apparatus of claim 11 further including
an address counter for assigning sequential addresses for
accessing sequential empty locations of said memory for
providing said next empty location of (i), said sequential
addresses beginning with [A]+1.
-19-
13. The apparatus of claim 11 wherein said
initializing means further comprises:
means for inserting into the character fields of
the locations of said memory, except for said [A]
locations, an arbitrary bit pattern not recognized as one
of the data character signals of said alphabet.
14. The apparatus of claim 11 further including
data decompression apparatus for decompressing said stream
of compressed code signals to recover said stream of input
data character signals corresponding thereto, wherein the
operations of (o) through (y) define a decompression
cycle, said data decompression apparatus comprising:
(1) a decompression memory having a plurality of
locations for storing strings of data character signals,
each location having a prefix code field and a character
field, each location having an address associated
therewith, the address providing a compressed code signal
for a string stored in said decompression memory,
(m) means for initializing said decompression
memory to contain [A] single character strings of said
alphabet by nulling the prefix code field of [A] locations
of said decompression memory and inserting the data
character signals of said alphabet into the character
fields of said [A] locations, respectively,
(n) an address register for accessing said
locations of said decompression memory,
(o) an input code register for receiving a
compressed code signal,
(p) means for transferring the contents of said
input code register to said address register,
(q) a prior code register for holding the
compressed code signal received in the decompression cycle
preceding a current decompression cycle,
(r) a stack,
-20-
(s) decompression control means coupled to said
decompression memory, to said address register, to said
input code register, to said prior code register and to
said stack for operating said decompression memory for
accessing the location of said decompression memory
corresponding to the contents of said address register,
(t) said decompression control means being
operative for causing the contents of the character field
of the accessed location to be inserted into said stack,
thereby inserting the data character signal in the
character field of the accessed location into said stack,
(u) said decompression control means being
operative for causing the contents of the prefix code
field of the accessed location to be inserted into said
address register,
(v) said decompression control means being
operative to repeat the operations of (s) through (u)
until the contents of said address register is null,
thereby inserting into said stack the data character
signals corresponding to the received compressed code
signal,
(w) said decompression control means being
further operative to insert the address of a next empty
location into said address register and to write an update
prefix code and an update character into the prefix code
field and the character field, respectively, of the
location of said decompression memory accessed by said
address register, the update prefix code being provided by
said prior code register, the update character being
provided by the last data character signal inserted into
said stack, thereby inserting into said decompression
memory an extended string corresponding to the extended
string inserted into said associative memory, the address
of said next empty location providing the compressed code
signal for said extended string inserted into said
decompression memory,
-21-
(x) said decompression control means being
further operative to output the contents of said stack,
thereby recovering the string of data character signals
corresponding to the received compressed code signal,
(y) said decompression control means being
further operative to transfer the received compressed code
signal in said input code register into said prior code
register,
(z) said decompression control means being
operative to repeat the operations of (o) through (y)
until no further stream of compressed code signals is
available to be decompressed.
15. The apparatus of claim 14 further including
an address counter for assigning sequential addresses for
accessing sequential empty locations of said decompression
memory, thereby providing the address of said next empty
location, said sequential empty locations beginning with
[A]+1.
16. The apparatus of claim 14 wherein said
decompression control means is further operative to output
the data character signals from said stack in an order
reversed from the order in which the data character
signals were inserted into said stack.
17. The apparatus of claim 14 wherein said
decompression control means is operative to operate said
decompression apparatus in an exception processing mode
invoked when a received compressed code signal does not
have a corresponding string stored in said decompression
memory, said received compressed code signal thereby being
unrecognized, said decompression control means operative
in said exception processing mode to:
create an exception extended string comprising the
string corresponding to the compressed code signal in said
prior code register extended by said update character,
output said exception extended string, thereby
outputting the string corresponding to said unrecognized
compressed code signal, and
-22-
store said exception extended string in said
decompression memory, said unrecognized compressed code
signal providing the compressed code signal corresponding
to said stored exception extended string.
18. The apparatus of claim 17 wherein said
decompression control means is operative in said exception
processing mode to:
insert said update character into said stack,
transfer the contents of said prior code register
to said address register,
perform the operations of (s) through (x), to
thereby create said exception extended string, output said
exception extended string and store said exception
extended string in said decompression memory with the
address of (w) providing said unrecognized compressed code
signal for said exception extended string, and
continue the decompression cycle with the operation
of (y).
19. The apparatus of claim 18 wherein the
operations of (e) through (j) define a compression cycle,
said compression apparatus performing a current
compression cycle following performing a prior compression
cycle, said compression apparatus providing said
unrecognized compressed code signal when the compression
apparatus in the current compression cycle provides the
compressed code signal of the extended string inserted
into said associative memory in the operations of (i) of
the prior compression cycle.
20. The apparatus of claim 18 further including:
an address counter for assigning sequential
addresses for accessing sequential empty locations of said
decompression memory, thereby providing the address of
said next empty location of (w), said sequential empty
locations beginning with [A]+1, and
means for comparing a received compressed code
signal in said input code register with the contents of
said address counter,
-23-
said decompression control means operative to
invoke said exception processing mode in accordance with
said comparison between said received compressed code
signal in said input code register and said contents of
said address counter.