Lossless compression of ordered integer lists
First Claim
Patent Images
1. A computer implemented method for compressing an array A[.] of ordered positive integer values stored in a memory:
- defining an inverse array I[.] of the ordered array A[.] as I[j]=inverse(A[.])=first(j+k, A[.]);
k=arg minl (j+lε
A[.]), l≧
0,where a function first(j, A[.]) returns a location of a first instance of an jth entry in the array A[.], and a function minl(j+lε
A[.]) returns a smallest value l such that j+l is an entry in the array A[.];
defining a kth split inverse Ik[.]=splitinversek(A[.]) of the array A[.] as Ik[.]=inverse(A[.]>
>
k), where A[.]>
>
k is an array obtained by right-shifting each entry of the array A[.] by k bits;
defining a kth split of the array A[.] as Ak[.]=A[.]&
Mask[k], where Mask[k]=Σ
j=0k−
12k.A[.] represents an array obtained by masking all but the last k bits of each of entry of the array A[.];
defining a null array A0[.] having the same length as the array A[.], defining a function Size(A[.]) for returning a total number of bits required to store the array A[.] in a compressed form as Size(A[.])=length(A[.])×
width(A[.]), where width(A[.])=ceil(log2(max(A[.]))) is the number of bits required to store a largest integer value in the array A[.];
defining a function MinSize for determining a minimum number of bits required to store the array A[.] in terms of the split arrays and split inverse arrays by MinSize(A[.])=mink{Size(Ik[.])+Size(Ak[.])+Ck}, where Ckis overhead required to store pointers to the split arrays, length of the split arrays, and an indication that the array A[.] is stored in terms of the split arrays and the split inverse arrays;
defining a function OptSize(.) for determining a size of the array A[.] in terms of the split arrays and the split inverse arrays as OptSize(A[.])=mink(OptSize(Ik[.])+Size(Ak[.])+Ck}, wherein {circumflex over (k)} is an optimal value of k;
determining an optimal size for the array Aj[.] using the function OptSize;
storing the array Aj[.] if kj=width(Aj[.]), and otherwise separating the array Aj[.] into the split inverse arrays Ikjj and the split arrays Akjj, and storing the split arrays Akjj, and setting the array Aj+1[.] equal to the array Ikjj, and repeating, beginning at the determining step, for j=j+1 to generate the arrays Ak00[.], Ak11[.], Ak22[.], . . . , AkJ−
1j−
1[.], and the array AJ[.], where J is the value of j upon completion.
1 Assignment
0 Petitions
Accused Products
Abstract
A method compresses one or more ordered arrays of integer values. The integer values can represent a vocabulary of a language mode, in the form of an N-gram, of an automated speech recognition system. For each ordered array to be compressed, and an inverse array I[.] is defined. One or more spilt inverse arrays are also defined for each ordered array. The minimum and optimum number of bits required to store the array A[.] in terms of the split arrays and split inverse arrays are determined. Then, the original array is stored in such a way that the total amount of memory used is minimized.
21 Citations
1 Claim
-
1. A computer implemented method for compressing an array A[.] of ordered positive integer values stored in a memory:
-
defining an inverse array I[.] of the ordered array A[.] as I[j]=inverse(A[.])=first(j+k, A[.]);
k=arg minl (j+lε
A[.]), l≧
0,where a function first(j, A[.]) returns a location of a first instance of an jth entry in the array A[.], and a function minl(j+lε
A[.]) returns a smallest value l such that j+l is an entry in the array A[.];
defining a kth split inverse Ik[.]=splitinversek(A[.]) of the array A[.] as Ik[.]=inverse(A[.]>
>
k), where A[.]>
>
k is an array obtained by right-shifting each entry of the array A[.] by k bits;
defining a kth split of the array A[.] as Ak[.]=A[.]&
Mask[k],where Mask[k]=Σ
j=0k−
12k.A[.] represents an array obtained by masking all but the last k bits of each of entry of the array A[.];
defining a null array A0[.] having the same length as the array A[.], defining a function Size(A[.]) for returning a total number of bits required to store the array A[.] in a compressed form as Size(A[.])=length(A[.])×
width(A[.]), where width(A[.])=ceil(log2(max(A[.]))) is the number of bits required to store a largest integer value in the array A[.];
defining a function MinSize for determining a minimum number of bits required to store the array A[.] in terms of the split arrays and split inverse arrays by MinSize(A[.])=mink{Size(Ik[.])+Size(Ak[.])+Ck}, where Ckis overhead required to store pointers to the split arrays, length of the split arrays, and an indication that the array A[.] is stored in terms of the split arrays and the split inverse arrays;
defining a function OptSize(.) for determining a size of the array A[.] in terms of the split arrays and the split inverse arrays as OptSize(A[.])=mink(OptSize(Ik[.])+Size(Ak[.])+Ck}, wherein {circumflex over (k)} is an optimal value of k;
determining an optimal size for the array Aj[.] using the function OptSize;
storing the array Aj[.] if kj=width(Aj[.]), and otherwise separating the array Aj[.] into the split inverse arrays Ik j j and the split arrays Akj j, and storing the split arrays Akj j, and setting the array Aj+1[.] equal to the array Ikj j, andrepeating, beginning at the determining step, for j=j+1 to generate the arrays Ak 0 0[.], Ak11[.], Ak2 2[.], . . . , AkJ−
1j−
1[.], and the array AJ[.], where J is the value of j upon completion.
-
Specification