Traitement en cours

Veuillez attendre...

Paramétrages

Paramétrages

Aller à Demande

1. US20050283355 - Data compression method, program, and apparatus to allow coding by detecting a repetition of a matching character string

Note: Texte fondé sur des processus automatiques de reconnaissance optique de caractères. Seule la version PDF a une valeur juridique

[ EN ]

Claims

1. A data compression method that generates compressed data from a data string to be compressed, comprising:
an input step of inputting and retaining, by an input unit, the data string to be compressed in the input buffer;
a list generating step of generating and retaining, by a recent-match-position-list generating unit, a recent match position list having stored therein a relative position where each character string having a predetermined length starting at each address in the input buffer has most recently appeared;
a candidate acquiring step of acquiring, by a repetition candidate acquiring unit, with the use of the recent match position list, a repetition candidate at a position where a character string at a coding position has previously appeared;
a match detecting step of comparing, by a match detecting unit, a character string starting at the position of the acquired repetition candidate and the character string at the coding position, and detecting a matching character string from the position of the repetition candidate; and
a code generating step of coding, by a code generating unit, the detected matching character string.
2. The data compression method according to claim 1, wherein
in the candidate acquiring step, a stored value acquired from the recent match position list with the coding position being taken as an address is taken as a first candidate for a character-string repetition position, and
in the match detecting step, a character string starting at a position of the first candidate and the character string starting at the coding position are compared, and a matching character string is acquired and coded.
3. The data compression method according to claim 2, wherein
the candidate acquiring step further includes:
a first step of taking the first candidate as an evaluation value; and
a second step of comparing the stored value acquired from the recent match position list and the evaluation value with each address subsequent to the coding position being taken as an address and, when the acquired stored value is a value previous to the evaluation value, acquiring one or a plurality of subsequent candidates in order of increasing distance from the coding position, and
in the match detecting step, each of character strings starting at the first candidate and the subsequent candidates and the character string starting at the coding position are compared, and a character string having the longest match length is acquired and coded.
4. The data compression method according to claim 3, wherein
in the candidate acquiring step, when the subsequent candidate is acquired, a value of the acquired subsequent candidate is taken as an evaluation value for acquiring a next subsequent candidate.
5. The data compression method according to claim 2, wherein
the candidate acquiring step further includes:
a first step of taking a value acquired from the recent match position list with the first candidate being taken as an address; and
a second step of comparing a stored value acquired from the recent match position list and the evaluation value with each address subsequent to the coding position being taken as an address and, when the acquired stored value is a value previous to the evaluation value, acquiring one or a plurality of subsequent candidates in order of increasing distance from the coding position as, and
in the match detecting step, each of character strings starting at the first candidate and the subsequent candidates and the character string starting at the coding position are compared, and a character string having the longest match length is detected and coded.
6. The data compression method according to claim 5, wherein
in the candidate acquiring step, when the subsequent candidate is acquired, a value of the acquired subsequent candidate is taken as an evaluation value for acquiring a next subsequent candidate.
7. The data compression method according to claim 2, wherein
in the candidate acquiring step, as one or plural subsequent candidates following the first candidate, a stored value acquired from the recent match position list with a preceding candidate being taken as an address, and
in the match detecting step, each of character strings starting at the first candidate and the subsequent candidates and the character string starting at the coding position are compared, and a character string having the longest match length is acquired and coded.
8. The data compression method according to claim 2, wherein
the candidate acquiring step further includes:
a first step of comparing, with the first candidate being taken as an evaluation value, a stored value acquired from the recent match position list and the evaluation value with each position subsequent to the coding position being taken as an address and, when the acquired stored value is a value previous to the evaluation value, acquiring one or plural subsequent candidates following the first candidate in order of increasing distance from the coding position, comparing each of character strings starting at the first candidate and the subsequent candidates and the character string starting at the coding position, and taking, as a revised first candidate, a character string having the longest match length with respect to the character string at the coding position; and
a second step of taking, as one or plural subsequent candidates following the revised first candidate, a stored value acquired from the recent match position list as revised subsequent candidates with a preceding candidate being taken as an address, and
in the match detecting step, each of character strings starting at the revised first candidate and the revised subsequent candidates and the character string starting at the coding position are compared, and a character string having the longest match length is detected and coded.
9. The data compression method according to claim 1, wherein
in the code generating step, the character string from the coding position is coded with a relative position and the match length of the detected matching character string.
10. A computer-readable storage medium which stores a program for compressing data allowing a computer to execute:
an input step of inputting and retaining the data string to be compressed in the input buffer;
a list generating step of generating and retaining a recent match position list having stored therein a relative position where each character string having a predetermined length starting at each address in the input buffer has most recently appeared;
a candidate acquiring step of acquiring, by using the recent match position list, a repetition candidate at a position where the character string at a coding position has previously appeared
a match detecting step of comparing a character string starting at the position of the acquired repetition candidate and the character string starting at the coding position, and acquiring a matching character string from the position of the repetition candidate; and
a code generating step of coding the detected matching character string. Here, details on this program are basically the same as those on the data compression method.
11. The storage medium according to claim 10, wherein
in the candidate acquiring step, a stored value acquired from the recent match position list with the coding position being taken as an address is taken as a first candidate for a character-string repetition position, and
in the match detecting step, a character string starting at a position of the first candidate and the character string starting at the coding position are compared, and a matching character string is acquired and coded.
12. The storage medium according to claim 11, wherein
the candidate acquiring step further includes:
a first step of taking the first candidate as an evaluation value; and
a second step of comparing the stored value acquired from the recent match position list and the evaluation value with each address subsequent to the coding position being taken as an address and, when the acquired stored value is a value previous to the evaluation value, acquiring one or a plurality of subsequent candidates in order of increasing distance from the coding position, and
in the match detecting step, each of character strings starting at the first candidate and the subsequent candidates and the character string starting at the coding position are compared, and a character string having the longest match length is acquired and coded.
13. The storage medium according to claim 12, wherein
in the candidate acquiring step, when the subsequent candidate is acquired, a value of the acquired subsequent candidate is taken as an evaluation value for acquiring a next subsequent candidate.
14. The storage medium according to claim 11, wherein
the candidate acquiring step further includes:
a first step of taking a value acquired from the recent match position list with the first candidate being taken as an address; and
a second step of comparing a stored value acquired from the recent match position list and the evaluation value with each address subsequent to the coding position being taken as an address and, when the acquired stored value is a value previous to the evaluation value, acquiring one or a plurality of subsequent candidates in order of increasing distance from the coding position as, and
in the match detecting step, each of character strings starting at the first candidate and the subsequent candidates and the character string starting at the coding position are compared, and a character string having the longest match length is detected and coded.
15. The storage medium according to claim 14, wherein
in the candidate acquiring step, when the subsequent candidate is acquired, a value of the acquired subsequent candidate is taken as an evaluation value for acquiring a next subsequent candidate.
16. The storage medium according to claim 11, wherein
in the candidate acquiring step, as one or plural subsequent candidates following the first candidate, a stored value acquired from the recent match position list with a preceding candidate being taken as an address, and
in the match detecting step, each of character strings starting at the first candidate and the subsequent candidates and the character string starting at the coding position are compared, and a character string having the longest match length is acquired and coded.
17. The storage medium according to claim 11, wherein
the candidate acquiring step further includes:
a first step of comparing, with the first candidate being taken as an evaluation value, a stored value acquired from the recent match position list and the evaluation value with each position subsequent to the coding position being taken as an address and, when the acquired stored value is a value previous to the evaluation value, acquiring one or plural subsequent candidates following the first candidate in order of increasing distance from the coding position, comparing each of character strings starting at the first candidate and the subsequent candidates and the character string starting at the coding position, and taking, as a revised first candidate, a character string having the longest match length with respect to the character string at the coding position; and
a second step of taking, as one or plural revised subsequent candidates following the revised first candidate, a stored value acquired from the recent match position list as revised subsequent candidates with a preceding candidate being taken as an address, and
in the match detecting step, each of character strings starting at the revised first candidate and the revised subsequent candidates and the character string starting at the coding position are compared, and a character string having the longest match length is acquired and coded.
18. The storage medium according to claim 10, wherein
in the code generating step, the character string from the coding position is coded with a relative position and the match length of the detected matching character string.
19. A data compression apparatus that generates compressed data from a data string to be compressed, comprising:
an input buffer that input and retain, in the input buffer, a data string to be compressed;
a recent-match-position--list generating unit that generates and retains a recent match position list having stored therein a relative position where each character string having a predetermined length starting at each address in an input buffer has most recently appeared;
a candidate acquiring unit that acquires, by using the recent match position list, a repetition candidate at a position where the character string at the coding position has previously appeared;
a match detecting unit that compares a character string starting at the position of the acquired repetition candidate and the character string starting at the coding position, and detecting a matching character string from the repetition candidate; and
a code generating unit that codes the detected matching character string.