Data compressing method, data compressing apparatus, data decompressing method and data decompressing apparatus

- Fujitsu Limited

A data compressing method involves the use of a data string registering unit for registering a charactor or charactor string and the context and a code information registering unit for registering coding information of the character or character string following the context, the coding information following previous a input data. The data compressing method includes a data string new registering step of, when the input character or character string and the context set is not registering in the string registering unit, register the set in the data string registering unit. The same method also includes a code information new registering step of, when the input character or character string's code information following the context is not registering in the code information registering unit, register the code information in the code information registering unit and a code outputting step of outputting the code following the code information registered in the code information registering unit and a code information updating step of updating the code information registering unit.

Skip to:  ·  Claims  ·  References Cited  · Patent History  ·  Patent History

Claims

1. A data compressing method comprising:

a data string new registering step of, when a character and a context occur a first time, newly registering the character and the context, occurring for the first time, in a data string registering unit;
a code information new registering step of, when the character and the context occur a second time, newly registering coding information into the code for the current character following the context in the code information registering unit;
a code outputting step of outputting the code following the code information registered in the code information registering unit; and
a code information updating step of updating the code information registering unit.

2. A data compressing method according to claim 1, wherein the frequency of the data string is monitored up a fixed number, and

only the coding information of the current character following the context registered when the frequency exceeds the predetermined number is newly registered in the code information new registering step.

3. A data compressing method according to claim 2, wherein if said code information registering unit is constructed of a code tree having a binary tree structure, leaves of the code tree are set as data while paths extending from the root of the code tree down to the respective leaves are set as codes,

in said code information updating step, the code tree is updated by exchanging a node's child, wherein the node is the path of root and current data's leaf,
the code information is registered in the new leaf obtained by diverging the leaf of the code tree in said code information new registering step, and
the leaf of the code tree is deleted together with the diverging node positioned closer by one path to the root in said data string/code information deleting step.

4. A data compressing method according to claim 2, wherein the code information registered in said code information registering unit is coded by an arithmetic coding method.

5. A data compressing method according to claim 1, wherein if said code information registering unit is constructed of a code tree having a binary tree structure, leaves of the code tree are set as data while paths extending from the root of the code tree down to the respective leaves are set as codes,

in said code information updating step, the code tree is updated by exchanging a node's child, wherein the node is the path of root and current data's leaf,
the code information is registered in the new leaf obtained by diverging the leaf of the code tree in said code information new registering step, and
the leaf of the code tree is deleted together with the diverging node positioned closer by one path to the root in said data string/code information deleting step.

6. A data compressing method according to claim 1, wherein the code information registered in said code information registering unit is coded by an arithmetic coding method.

7. A data compressing method according to claim 6, wherein said data string/code information deleting step includes:

a deletion determining step of determining whether or not the data string registered in said data string registering unit and the coding information registered in said code information registering unit are deleted;
a deleting target selecting step of selecting, when determining that the deletion thereof is carried out in said deletion executing determining step, the data string to be deleted and the coding information to be deleted;
a deleting step of deleting the data string and the coding information that are selected in said deleting target selecting step respectively from said data string registering unit and said code information registering unit; and
an updating-for-deletion step of updating said code information registering unit after being deleted in said deleting step,
said updating-for-deletion step involving dividing the number occurrences of the code information by a multiple of 2 and setting, when a divided value is 1 or smaller, the number of occurrence to 1.

8. A data compressing method comprising:

a data string new registering step if, when a character and a context occur a first time, newly registering the current character and the context occurring for a first time, in a data string registering unit;
a code information new registering step of, when the character and the context occur a second time, newly registering coding information into the code for the current character following the context in said code information registering unit;
a code outputting step of outputting the code following the code information registered in said code information registering unit;
a code information updating stop of updating said code information registering unit; and
a data string/code information deleting step of deleting the data string registered in said data string registering unit and deleting the code information registered in said code information registering unit, the data string/code information deleting step carried out at one of:
(i) each time a count value exceeds a fixed quantity, the count value obtained by counting an accumulation value of a capacity of the new input data;
(ii) monitoring a data compression ratio and carrying out the data string/code information deleting step when the monitored data compression ratio becomes worse;
(iii) when making a new registration and a total number of registrations in said data string registering unit exceeds a fixed number.

9. A data compressing method according to claim 8, wherein said data string/code information deleting step includes:

an initializing step of initializing the data string registered in said data string registering unit and the coding information registered in said code information registering unit, the initializing unit being carried out at one of:
(i) each time a count value exceeds a fixed quantity, the count value obtained by counting an accumulation value of a capacity of the new input data;
(ii) monitoring a data compression ratio and carrying out the initializing step when the monitored data compression ratio becomes worse; and
(iii) when making a new registration and a total number of registrations in said data string registering unit exceeds a fixed number.

10. A data compressing method according to claim 8, wherein said data string/code information deleting step includes:

a deletion determining step of determining whether the data string registered in said data string registering unit and the coding information registered in said code information registering unit are deleted;
a deleting target selecting step of selecting, when determining that the deletion thereof is carried out in said deletion determining step, the data string to be deleted and the coding information to be deleted; and
a deleting step of deleting the data string and the coding information that are selected in said deleting target selecting step from said data string registering unit and said code information registering unit.

11. A data compressing method according to claim 10, wherein in said deleting target selecting step, if said data string registering unit is viewed as a tree structure, all pointers pointing nodes defined as internal nodes of the tree and leaves as terminals of the tree are registered in a deleting rank list, and

the data string and the coding information that are pointed by the pointers registered in a low rank in this deleting rank lists are deleted in said deleting step.

12. A data compressing method according to claim 11, wherein in said deleting target selecting step, the frequency of the pointer is monitored, and the pointer having a high frequencies registered in a high rank in said deleting rank list.

13. A data compressing method according to claim 10, wherein in said deleting target selecting step, if said data string registering unit is viewed as a tree structure, pointers pointing leaves as terminals of the tree are registered in one deleting rank list, and

the data string and the coding information that are pointed by the pointers registered in a low order in the deleting rank list are deleted in said deleting step.

14. A data compressing method according to claim 13, wherein in said deleting target selecting step, the frequency of the pointer is monitored, and

the pointer having a high frequencies registered in a high rank in said deleting rank link.

15. A data compressing method according to claim 10, wherein in said deleting target selecting step, if said data string registering unit is views as a tree structure, pointers pointing internal nodes of the tree are registered in on deleting rank list, and the data string and the coding information that are pointers registered in a low rank deleted in said deleting step.

16. A data compressing method according to claim 15, wherein in said deleting target selecting step, the frequency of the pointer is monitored, and

the pointer having a high frequencies registered in a high rank in said deleting rank link.

17. A data compressing method according to claim 10, wherein in said deleting target selecting step, the pointer corresponding to a newly registered leaf is registered in the highest rank in the deleting rank list, and the pointer corresponding to the context which has occured, the character and the context should be moved to the most significant of the deleting rank list.

18. A data compressing method according to claim 10, wherein in said deleting target selecting step, the pointer corresponding to a newly registered leaf is registered in the lowest rank in the deleting rank list, and the order in the deleting rank list of the pointer corresponding to the context which has occured, the character and the context should be halved.

19. A data compressing method according to claim 10, wherein in said deleting target selecting step, the order in the deleting rank list of the pointer corresponding to the context which has occured, the character and the context should be raised by one.

20. A data compressing method to claim 10, wherein in said target deleting step, when the frequency of a character and a context is less than the predetermined value, the set of the character and the context should be selected as a deleting data.

21. A data compressing method according to claim 10, wherein in said deleting target selecting step, when the frequency of a character and a context is less than the fixed value, the set of the character and the context should be selected as a deleting data.

22. A data compressing method according to claim 10, wherein in said deleting execution determining step, the number of registrations in said data string registering unit is monitored,

when this number exceeds a fixed number on the occasion of a new registration, one of the deleting targets selected in said deleting target selecting step is deleted in said deleting step, and
a new registration tuple is instead registered.

23. A data compressing method according to claim 10, wherein a half of the data strings registered in said data string registering unit are deleted in said deleting step.

24. A data compressing method according to claim 8, wherein said data string/code information deleting step includes:

a deleting target selecting step of selecting the data string to be deleted and the coding information to be deleted,
when the number of registrations in said data string registering unit exceeds a fixed number on the occasion of a new registration, one of the deleting targets selected in said deleting target selecting step is deleted as well as registering a new registration tuple, and
when a data compression ratio be worse, initialize the data string registered in said data string registering unit and the code information in said code information registering unit.

25. A data compressing method according to claim 8, wherein if said code information registering unit is constructed of a code tree having a binary tree structure, leaves of the code tree are set as data while paths extending from the root of the code tree down to the respective leaves are set as codes,

in said code information updating step, the code tree is updated by exchanging a node's child, wherein the node is the path of root and current data's leaf,
the code information is registered in the new leaf obtained by diverging the leaf of the code tree in said code information new registering step, and
the leaf of the code tree is deleted together with the diverging node positioned closer by one path to the root in said data string/code information deleting step.

26. A data compressing method according to claim 8, wherein the code information registered in said code information registering unit is coded by an arithmetic coding method.

27. A data compressing method of compression by coding, with a limited kind of characters serving as a target, an input character in accordance with a context representing an already-occured character string, said method comprising:

a context dictionary registering step of registering a combination of a coding process target context with a coding target character conceived as a child thereof in a context dictionary;
a code table registering step of registering, in a code table, information when coding the coding target character registered in the context dictionary;
an order setting step of setting an order expressed by the number of characters contained in the context;
a registration determining step of determining whether the combination of the coding target character and the coding process target context having the set order is registered in the context dictionary;
an unoccured code registering step of registering, if there is no combination of the coding target character and the coding process target contact an unoccured code indicating an escape into a context having a lower order in a code table corresponding to the context of the set order;
an unregistered processing step of outputting, if the combination of the coding target character and the coding process target context is found to have been unregistered in said registration determining step, the unoccured code of the set order and also decreasing the set order by one level;
a repeating step of repeating said registration determining step, an additional registering step and said unregistered processing step till the combination of the coding target character and the coding process target context is found to be registered in said registration determining step;
a code outputting step of outputting, if the combination of the coding target character and the coding process target context is found to be registered in said registration determining step, a code corresponding to the coding target character from the code table; and
an additional registering step of additionally registering the coding target character in the code table and the context dictionary having a order higher than the order of the coded character,
wherein the unoccured code corresponds to the context having the set order.

28. A data compressing method according to claim 27, wherein the unoccured code in the code table has a relationship corresponding to a storage location in the code table, and

when coding the unoccured character, the code corresponding to the storage location in the code table is outputted.

29. A data compressing method according to claim 27, wherein with respect to each combination of the coding target character and the coding process target context, there are registered a code table's storage location corresponding to the coding process target context and a code table's storage location corresponding to a second coding process target context generated by connecting the coding target character to the coding process target context, and

when outputting the unoccured code relative to the second coding process target context, the code table's storage location corresponding to the second coding process target context is employed.

30. A data compressing method according to claim 27, wherein the context dictionary is constructed in the form of a context tree, and

the code table is constructed in the form of a binary code tree.

31. A data compressing method according to claim 30, wherein a last branch among respective branches corresponding to the unoccured character in the code tree is connected to the root of the code tree, and

when coding the unoccured character, the code corresponding to a divergence of each node is outputted through one cycle tracing a parent thereof from the root of the code tree back again to the root.

32. A data compressing method according to claim 30, wherein with respect to each combination of the coding target character and the coding process target context, there are registered a code tree root corresponding to the coding process target context and a code tree root corresponding to a second coding process target context generated by connecting the coding target character to the coding process target context, and

when outputting the unoccured code relative to the second coding process target context, the code tree root corresponding to the second coding process target context is employed.

33. A data decompressing method of decompressing, with a limited kind of characters serving as a target, compressed data by coding an input character in accordance with a context representing an already-occured character string, said method comprising:

an order setting step of setting an order expressed the number of characters contained in the context;
a context dictionary registering step of registering, in a context dictionary, a combination of a decoded character and a context having a predetermined order;
a code table registering step of registering information for decoding in the code table independently for every decoded context;
a code table determining step of determining a code table corresponding to a decoding process target context of a predetermined order of the context decoded just anterior thereto;
an unoccured code registering step of registering, if the decoding target character is not registered in the decoding process target context of the set order, an unoccured code indicating an escape into a context of a lower order in the code table corresponding to the context of the set order;
a decompression processing step of decompressing the unoccured code of each order and decreasing the set order by one level till the character is decompressed;
a character outputting step of outputting, when the character is decompressed, a character corresponding to the code from the code table; and
a decompressed character additional registering step of additionally registering, when the character is can be decompressed at a certain order, the decompressed character in the code table and the context dictionary of an order higher than the order of the decompressed character, wherein the unoccured code in the decoding process target context of the set order is made corresponding to the context of the set order.

34. A data decompressing method according to claim 33, wherein the unoccured code in the code table has a relationship corresponding to a storage location in the ode table, and

the code corresponding to the storage location in the code table is decompressed as a unoccured character.

35. A data decompressing method according to claim 33, wherein in said context dictionary registering step, with respect to each combination of the decoding target character and the decoding process target context, there are registered a code table's storage location corresponding to the decoding process target context and a storage location for a second decoding process target context generated by connecting the decoding target character to the decoding process target context, and

when decoding the second decoding process target context, the storage location for the second decoding process target context is employed.

36. A data decompressing method according to claim 33, wherein the context dictionary is constructed in the form of a context tree, and

the code table is constructed in the form of a binary code tree.

37. A data decompressing method according to claim 36, wherein a last branch among respective branches corresponding to the unoccured codes in the code tree is connected to the root of the code tree, and

when decoding the unoccured code, the code is determined as the unoccured code through one cycle tracing right and left children in accordance with a code bit from the root of the code tree back again to the root.

38. A data decompressing method according to claim 36, wherein with respect to each combination of the decoding target character and the decoding process target context, there are registered a code tree root corresponding to the decoding process target context and a code tree root corresponding to a second decoding process target context generated by connecting the decoding target character to the decoding process target context, and

when decompressing the second decoding process target context, the code tree root corresponding to the second decoding process target context is employed.

39. A data compressing apparatus for executing a compression by coding, with a limited kind of characters serving as a target, an input character in accordance with a context representing an already-occured character string, said apparatus comprising:

a context dictionary registering unit for registering a combination of a coding process target context and a coding target character conceived as a child thereof in a context dictionary;
a code tree registering unit for registering, in a binary code tree, information when coding the coding target character registered in the context dictionary;
a order setting unit for setting a order expressed by the number of characters contained in the context;
a registration determining unit for determining whether or not the combination of the coding target character with the coding process target context having the set order is registered in the context dictionary;
an unoccured code registering unit for registering, if there is no combination of the coding target character with the coding process target context, an unoccured code indicating an escape into a context having a lower order as a root of the code tree corresponding to the context of the set order;
an unregistered processing unit for outputting, if the combination of the coding target character and the coding process target context is found to be unregistered in said registration determining unit, the unoccured code of the set order and also decreasing the set order by one level;
a repeating unit for repeating the processes conducted in said registration determining unit, an additional registering unit and said unregistered processing unit till the combination of the coding target character and the coding process target context is found to be registered in said registration determining unit;
a code outputting unit for outputting, if the combination of the coding target character and the coding process target context is found to be registered in said registration determining unit, codes corresponding to divergences of nodes from a root of the code tree down the leaf stored with the coding target character; and
a coding target character additional registering unit for additionally registering the coding target character in the code tree and the context dictionary having an order higher than the order at which the combination is found to be registered,
wherein said context dictionary registering unit allocates a univocal identifier to the context to be registered,
said code tree registering unit allocates a univocal identifier to the root of the code tree, and
said unoccured code registering unit allocates, to the unoccured code, an identifier coincident with the identifier allocated in said context dictionary registering unit and with the identifier allocated in said code tree registering unit.

40. A data compressing apparatus according to claim 39, wherein said code outputting unit determines whether the coding target character is a unoccured character or an ordinary character and, when said initialization determining unit determines that the character is the unoccured character, searches a node of the code tree through one cycle tracing a parent thereof from the root of the code tree back again to the root.

41. A data compressing apparatus according to claim 39, wherein said context dictionary registering unit registers, with respect to each combination of the coding target character and the coding process target context, a code tree root corresponding to the coding process target context and a code tree root corresponding to a second coding process target context generated by connecting the coding target character to the coding process target context, and.

when said code outputting unit outputs the unoccured code relative to the second coding process target context, the code tree root corresponding to the second coding process target context is employed.

42. A data decompressing apparatus for decompressing, with a limited kind of characters serving as a target, compressed data by coding an input character in accordance with a context representing an already-occured character string, said apparatus comprising:

an order setting unit for setting an order expressed the number of characters contained in the context;
a context dictionary registering unit for registering, in a context dictionary, a combination of a decoded character and a context having a predetermined order;
a code tree registering unit for registering information for decoding in a binary code tree independently for every decoded context;
a code tree determining unit for determining a code tree corresponding to a decoding process target context of a predetermined order composed of the characters decoded just anterior thereto;
an unoccured code registering unit for registering, if the decoding target character is not registered in the decoding process target context of the set order, an unoccured code indicating an escape into a context of a lower order as a root of the code tree corresponding to the context of the set order;
a context changing unit for repeating, after decompressing the escape code of each order, the decompressing process by decreasing the order of the decoding process target context till the character is decompressed;
a decoding unit for outputting the character after tracing branches of nodes in accordance with respective bits of the codes from the root of the code tree down to a leaf registered with the decoding target character; and
a decompressed character registering unit for registering the decompressed character in the code tree and the context of a order higher than the order of the decompressed character,
wherein said context dictionary registering unit allocates a univocal identifier to the context to be registered,
said code tree registering unit allocates a univocal identifier to the root of the code tree, and
said unoccured code registering unit allocates, to the unoccured code, an identifier coincident with the identifier allocated in said context dictionary registering unit and with the identifier allocated in said code tree registering unit.

43. A data decompressing apparatus according to claim 42, wherein said decoding unit, when decoding the unoccured code, identifies the code as the unoccured code by confirming one cycle tracing right an d left children in accordance with a code bit from the root of the code tree back again to the root.

44. A data decompressing apparatus according to claim 42, wherein said context dictionary registering unit registers, and respect to each combination of the decoding target character with the decoding process target context, a code tree root corresponding to the decoding process target context and a code tree root corresponding to a second decoding process target context generated by connecting the decoding target character to the decoding process target context, and

said code outputting unit employs, when decoding relative to the second decoding process target context, the code tree root corresponding to the second decoding process target context.
Referenced Cited
U.S. Patent Documents
4672679 June 9, 1987 Freeman
5254990 October 19, 1993 Yoshida et al.
Patent History
Patent number: 5801648
Type: Grant
Filed: Dec 15, 1995
Date of Patent: Sep 1, 1998
Assignee: Fujitsu Limited (Kawasaki)
Inventors: Noriko Satoh (Kawasaki), Yoshiyuki Okada (Kawasaki), Shigeru Yoshida (Kawasaki), Hironori Yahagi (Kawasaki)
Primary Examiner: Jeffrey A. Gaffin
Assistant Examiner: Peguy Jean-Pierre
Law Firm: Staas & Halsey
Application Number: 8/574,436
Classifications
Current U.S. Class: Digital Code To Digital Code Converters (341/50); Tree Structure (341/79)
International Classification: H03M 730;