Abstract:
A method is provided for compressing relatively time invariant binary data, such as speech data in a telephone answering device, using statistical analysis of changes in the data. An original record organized into multiple frames of multiple bits each is used to construct an XORed record of the same number of frames and bits. The XORed record has a base frame with the same bit value pattern as a corresponding base frame of the original record, and remaining frames with bit values given by the outputs of an exclusive-OR operation applied to the bit values of corresponding and prior frames of the original record. The bit positions of the XORed record frame set are analyzed and reordered, according to their bit value change activity and used to construct an output record. The output record may have a base frame with the same bit value pattern as the corresponding reordered XORed record base frame. Other output record frames are established using a compression scheme wherein at least low bit value change subframes of the reordered XORed record frames are compressed by replacing them with shorter bit patterns having a format comprising a first part representing the number of bit changes occurring in the subframe and a second part identifying the location or locations, if any, of those changes. The foregoing procedure is reversed to restore the original record from the output record.

Description:
This application claims priority under 35 U.S.C. §119(e)(1) of provisional application Ser. No. 60/037,008 filed Jan. 31, 1997, entitled &#34;Data Compression Using Bit Change Statistics,&#34; the entirety of which is incorporated herein by reference. 
    
    
     This invention relates to methods for compressing data using statistical analysis of the data values. It is particularly useful for the compression of encoded speech data. 
     BACKGROUND OF THE INVENTION 
     There is an increased demand for ways to reduce the number of bits needed for transferring or storing data in binary digital form. This demand exists, for example, in the telecommunications industry for storing digitally encoded speech off-line into memory such as for telephone answering and recording purposes. One way to reduce needed memory capacity for binary digital data storage is through data compression. Data compression involves reformatting a binary representation of the data, using some defined encoding scheme to re-represent the same data in some new, abbreviated way, using fewer bits. A measure of the effectiveness of such compression is the accuracy and completeness with which the new compressed re-representation can be used to reproduce the original representation, when needed. 
     SUMMARY OF THE INVENTION 
     The invention provides a method for compressing a binary representation of data using statistical analysis of changes in the bit values of the data itself, to provide a new, abbreviated binary representation of the same data, from which the original representation can be completely reproduced, without any loss of information. 
     In accordance with the invention, compression is achieved by analyzing changes in the values of corresponding bit positions of successive frames of a binary digital data record, and representing the bit patterns of frames with few changes by shorter bit patterns identifying the number of changes and the bit locations of those changes. 
     In one aspect of the invention, the amount of compression is enhanced by reordering the bit positions according to numbers of changes for that bit position occurring in all frames of the statistical sample. In another aspect of the invention, the amount of compression is further enhanced by breaking the frames into subframes after reordering, with the compression analysis conducted on the subframes. In yet another aspect of the invention, the representations for the numbers of bit value changes in the compressed bit patterns are encoded using uniquely decipherable codes. 
     In one embodiment, described in greater detail below, the compression method is applied to a binary digital record organized into multiple frames of multiple bits each. The original record is used to construct an XORed record of the same number of frames and bits. The first frame of the XORed record is established as a base frame having the same bit value pattern as a corresponding first frame of the original record, and remaining frames of the XORed record are established as successive XORed frames having bit position values given by the outputs of an exclusive-OR operation applied to the values of like bit positions of corresponding and prior frames of the original record. The bit positions of the frames of the XORed record are analyzed to construct an activity vector A, which is sorted and used to derive an index R for reordering the bit positions of the XORed record, in ascending order, according to the number of bit value changes occurring for that bit location in all frames of the XORed record. The reordered XORed record is then used to construct an output record. The first frame of the output record is established as a base frame having the same bit value pattern as the reordered base frame of the XORed record. Other output record frames are established using a compression scheme wherein at least low bit value change subframes of frames of the XORed record are compressed by replacing them with shorter bit patterns having a format comprising a first part representing the number of bit changes occurring in the subframe and a second part identify the location or locations, if any, of those changes. The foregoing procedure is reversed to restore the original record from the output record. 
     The compression method of the invention finds application for compression of all data records that exhibit substantially unchanging bit position values from frame to frame, over short periods of time. It is particularly useful for the lossless compression (viz. further compression or &#34;recompression&#34;) for off-line storage of speech records which have been encoded using linear predictive encoding techniques, such as CELP (Codebook Excited Linear Prediction) from the U.S. Department of Defense, MELP (Mixed Excitation Linear Predictive) encoding, the RPE-LTP coder of the European digital cellular mobile telephone system GSM, the VSELP coder of the corresponding American system ADC, as well as the VSELP coder of the pacific digital cellular system PDC. Experiments conducted with MELP-encoded samples have indicated lossless compression with memory capacity savings on the order of 15%. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Embodiments of the invention have been chosen for purposes of illustration and description, and are shown with reference to the accompanying drawings wherein: 
     FIG. 1 is a block diagram of a digital signal processing system for an exemplary implementation of the data compression method of the invention; 
     FIGS. 2 through 7 are schematic diagrams helpfull in understanding the general principles of the compression method of the invention; 
     FIGS. 8 and 9 are process flow diagrams for the data compression and decompression processes; 
     FIGS. 10 through 16 are schematic diagrams showing application of the method to specific bit values; 
     FIG. 17 is a representative histogram for typical data; and 
     FIG. 18 is a schematic protrayal of the process flow of FIG. 8. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
     An exemplary implementation of the method of the invention is described with reference to a digital telephone answering device 10 shown in FIG. 1. When device 10 answers an incoming call to record a message, analog-to-digital converter (ADC) 11 samples analog speech from a telephone handset 12 at a given sampling rate (e.g., 8 KHz), converts the analog samples to digital values, and supplies the digital values to a speech encoder, such as digital signal processor (DSP) 14. Encoder 14 encodes the supplied values according to a predefined data framing protocol and the resulting encoded bit stream is stored in a digital memory storage component 15. During play-back, the encoded bit stream is retrieved from memory 15 and supplied to a speech decoder which reverses the encoding process. The decoder may be the same digital signal processor 14 that does the encoding. Digital-to-Analog converter (DAC) 17 synthesizes analog speech from the speech decoder output for replay over speaker 18. A low-pass, anitaliasing filter (not shown) filters the analog speech signal input to analog-to-digital converter 11. A high-pass, second order biquad filter (not shown) filters the digitized samples from analog-to-digital converter 11. The high pass filter attenuates D.C. or hum contamination that may occur in the incoming speech signal. The compression method of the invention is implemented in conjunction with encoding and decoding, by additional processing performed by the digital signal processor 14 executing program statements. 
     Digital signal processor 14 first acts to encode sampled speech data according to a predefined data framing protocol to provide a speech data record F, shown in FIG. 2, which has a sequence of N consecutive frames (F 1 , F 2 , . . . , F N ) of M bits each, indexed with b ji  corresponding to the i th  bit of the j th  frame. Thus, as shown in FIG. 2, the first (or &#34;base&#34;) frame F 1  has M bits identified as b 11  through b 1M , the second frame F 2  has M bits identified as b 21  through b 2M , the j th  frame F j  has M bits identified as b j1  through b jM , and the N th  frame F N  has M bits identified as b N1  through b NM . In accordance with the invention, a method is provided to compress (viz. further compress or &#34;recompress&#34;) the already encoded binary data record F of N×M bits, using the redundancy contained between successive frames and the statistical properties of the compressed speech record itself. Further in accordance with the invention, a method is provided to restore the original record from the compressed record, giving fill reproduction of the original, with no loss of information or degradation of quality. 
     Compression 
     As an initial step in the compression process, the compressed record F is used to construct an XORed (exclusive OR function) speech record XF having N consecutive frames (XF 1 , XF 2 , . . . , XF N ) of M bits each, indexed with Xb ji  corresponding to the i th  bit of the j th  frame of the XORed record XF. As indicated schematically in FIG. 3, the M bits of the first frame XF 1  of the record XF are the same as the M bits of the base frame F 1  of the starting record F. The bits of the remaining frames XF 2  through XF N  are obtained by applying the XOR binary function⊕ to the bits of the corresponding frames F 2  through F N  of the F record, to derive the j th  frame XF j  (for j=2 to N) of the XORed speech record XF, as follows: 
     
         XF.sub.j =F.sub.j ⊕F.sub.j-1 for j=2 to N.             (1) 
    
     Thus, as shown in FIG. 4, the bits of the XORed speech record XF are: 
     
         Xb.sub.1i =b.sub.1i for i=1 to M; and 
    
     
         Xb.sub.ji =b.sub.ji ⊕b.sub.(j-1)i for j=2 to N, i=1 to M.(2) 
    
     The value of the bits Xb ji  indicate whether the i th  bit of frame F j  has &#34;flipped&#34; (i.e. changed state) from the previous frame F j-1 . For example, if the i th  bit of frame F j  is a &#34;0&#34; and the corresponding i th  bit of frame F j-1  is also a &#34;0&#34;, the value of the i th  bit of frame XF j  will be a &#34;0&#34;; whereas if the i th  bit of frame F j  is a &#34;1&#34; and the corresponding i th  bit of frame F j-1  is a &#34;0&#34;, the value of the i th  bit of frame XF j  will be a &#34;1&#34;. 
     The next step is to construct an activity vector for each bit position i=1 to M of the XORed frame set XF. The purpose here is to acquire an indication of how many times each bit position i has flipped in going from one frame F j  to the next successive frame F j+1 , through all the frames XF 1  through XF N . This is done by accumulating M activity values A i  for i=1 to M corresponding to each bit position of the M-bit frame structure, by adding the XF bits as follows: ##EQU1## 
     An activity array (or list) A is then constructed, formed of the ordered pairs (A i , i) corresponding to each bit position 1 through M: 
     
         A=[(A.sub.1, 1), (A.sub.2, 2), . . . , (A.sub.i, i), . . . , (A.sub.M, M)].(4) 
    
     The next step is to group the least active bits by sorting the activity array A in ascending priority order according to the first argument of the ordered pairs, to get a sorted array SA defined as: 
     
         SA=[S.sub.1, S.sub.2, S.sub.3, . . . , S.sub.k, . . . , S.sub.M ],(5) 
    
     such that 
     
         S.sub.k =(A.sub.p.sbsb.k,P.sub.k) for k=1 to M,            (6) 
    
     where A pr  ≦A ps  for every r&lt;s for all 1≦r,s≦M. 
     An index array R is then constructed from the sorted array SA, as follows: 
     
         R=[P.sub.1, P.sub.2, . . . , P.sub.k, . . . , P.sub.M ].   (7) 
    
     The index array R indicates that bit position b pr  of the frames of speech record F flips the same amount or less (has less activity) than bit position b ps  if r&lt;s for all r, s between 1 and M, inclusively. 
     The next step is to obtain the output speech record (compressed record) OF by reordering the bits of the frames of the XORed frame record XF according to the index array R, dividing the frames into subframes, compressing the bit patterns of lower order ones of the subframes, and storing the resulting bits. The base frame XF 1  =F 1  can be treated the same as the other frames, or simply by storing its unaltered or reordered bit pattern with no further compression as the first M bits of the output speech record OF 1 . FIGS. 5 and 6 illustrate the case where the reordered bits of frame XF 1  are stored, without further compression, as the base frame of the output speech record OF 1 . Each other frame XF j  (j=2 to N) is divided into L subframes SF tj  (see FIG. 6) of length W t  for t=1 to L, where W t  is the number of bits in each subframe SF tj . The reordered frame XF 1  has M bits Xb 1p .sbsb.k for k=1 to M (where the P k  is the bit position order taken from the index array R), and each subframe SF tj  has W t  bits, as follows: 
     
         SF.sub.tj =[S.sub.1.sup.tj, . . . , S.sub.i.sup.tj, . . . , S.sub.w.sbsb.t.sup.tj ];                                  (8) 
    
     with the bit values defined by ##EQU2## For each subframe SF tj  for t=1 to L-1, SF tj  is compressed using the bit-location compression scheme described below, to get a corresponding compressed sorted array subframe CSF tj . CSF tj  is then stored in consecutive bits of the output speech record OF as shown in FIG. 7. For a typical stored speech record, the number of bits in the compressed subframe CSF tj  will on the average be less than the number of bits W t  of the corresponding subframe SF tj . The choice of which frames XF 1  to XF N  to reorder and divide into subframes and which subframes SF tj  to compress may, however, be varied to match the characteristics of the type of data involved and the degree to which compression can be achieved. 
     Bit-Location Compression Scheme 
     For typical compressed speech records, statistically, the first subframes SF tj  for small t (1, 2, etc.) have very few, if any, bits that are &#34;1&#34;. The compression scheme takes advantage of this and encodes the locations of the &#34;1&#39;s&#34; in the lower order subframes. For a small number of &#34;1&#39;s&#34; (0, 1, 2, etc.) occurring in a subframe, fewer bits will be needed on the average to show the number and placements of the non &#34;0&#34; bit locations than the total number of bits W t  in the subframe, thereby resulting in compression. 
     Consider an example bit-location compression applied to a subframe SF of length W t  =16 bits as input and a compressed subframe CSF as output. For this example, subframe SF has 16 possible bit locations for a &#34;1&#34; appearing in subframe SF and each location is to be identified by a binary encoding of Q=4 bits per location, [0000] for 1st position through [1111] for 16th position. First, the number count C of &#34;1&#39;s&#34; in the subframe SF is determined. If there are no &#34;1&#39;s&#34;, C=0 and no bit locations need be identified. Thus, using a two-bit binary indication for &#34;1&#34; bit number count, the compressed subframe is CSF=[00], with two bits used for the binary representation of the number of &#34;1&#39;s&#34; (00=no &#34;1&#39;s&#34;) and no bits needed to show the locations of any &#34;1&#34; positions. If there is one &#34;1&#34;, the number count C=1 and the compressed subframe CSF=[01x 1  x 2  x 3  x 4  ] is six bits long (a 10-bit savings); with [01] being the binary indication for one &#34;1&#34;, and [x 1  x 2  x 3  x 4  ] being the four-bit binary encoding, going from left to right in subframe SF, of the single &#34;1&#34; location in the 16-bit long subframe SF. If there are two &#34;1&#39;s&#34;, C=2 and CSF=[10x 1  x 2  x 3  x 4  y 1  y 2  y 3  y 4  ] is 10 bits long (a six-bit savings), with [10] indicating two &#34;1&#39;s&#34;, [x 1  x 2  x 3  x 4  ] being the four-bit binary encoding of the first &#34;1&#34; location, and [y 1  y 2  y 3  y 4  ] being the binary encoding of the second &#34;1&#34; location. For this example, the encoding scheme has been chosen so that, if there are more than two &#34;1&#39;s&#34; in the subframe, location information is not used and the actual bit values are shown. Thus, where there are three or more &#34;1&#39;s&#34;, C&gt;2 is indicated by [11], and CSF=[11s 1  s 2  . . . s 16  ], where s 1  through s 16  are the pass-through bit values of the subframe SF. Here, the frame CSF is 18 bits long (a two-bit deficit). 
     A generalization of this scheme has two variations: Case 1 for a subframe of width (number of bits) W, where 2 Q  -1&lt;W≦2 Q  so that binary encoding is available in Q bits to directly uniquely identify each possible bit location 1 through W (e.g., four bits are used to identify &#34;1&#34;locations in a 16-bit subframe), and Case 2 for a subframe of width W, where W=2 Q  +I for I=1, 2, etc. for which the bit location bits are insufficient for direct unique identification of identify all possible locations (e.g., four bits are used to identify &#34;1&#34;locations in a 20-bit subframe). 
     Case 1: 
     Let SF=[s 0  s 1  . . . s 2 .spsb.Q -1  ] be a subframe which is 2 Q  bits long. First, the count number C of &#34;1&#39;s&#34; in subframe SF is determined. If C=0, then the output compressed subframe CSF=[00]. If C=1, then CSF=[01x 1  x 2  . . . x Q  ], where [x 1  x 2  . . . x Q  ] is the encoded location of the single &#34;1&#34; bit position in SF (i.e., index of the bit s i  =1,i). If C=2, then CSF=[10x 1  x 2  . . . x Q  y 1  y 2  . . . y Q  ], where [x 1  x 2  . . . x 3  x Q  ] and [y 1  y 2  . . . y Q  ] are the respective four-bit encoded locations of the first and second &#34;1&#34; bit positions in SF. If C&gt;2, then CSF=[11s 0  s 1  . . . s 2 .spsb.Q -1  ]. 
     Case 2: 
     Let SF=[s 0  s 1  . . . s 2 .spsb.Q +I-1  ], where I is a small integer 1, 2, . . . , 2 Q-1  determined from the statistics of the compression and histogram of the count C. First, the count number C of &#34;1&#39;s&#34; in subframe SF is determined. Then, if C=0, the output CSF=[00]. If s 0  =s 1  =s I-1  =0 and C=1, then CSF=[01x 1  . . . x Q  ], where [x 1  . . . x Q  ] is the location of the first &#34;1&#34; in bits [s I  . . . s 2 .spsb.Q +I-1  ] where location=i-I if s i  =1. If C=2 and Loc1-Loc2&lt;2 Q  and Loc2&gt;I, where Loc1 is the location of the first &#34;1&#34; and Loc2 is the location of the second &#34;1&#34; in the subframe SF, then xLoc2=(2 Q  +I-1)-Loc2; dloc=Loc2-Loc1; and then CSF=[10x 1  . . . x Q  y 1  . . . y Q  ] where [x 1  . . . x Q  ] is the Q-bit encoding of xLoc2 and [y 1  . . . y Q  ] is the encoding of dloc. For C&gt;2, CSF=[11s 0  . . . s 2 .spsb.Q +I-1  ]. 
     EXAMPLE 
     Consider an encoding scheme for the case of, for example, Q=4, I=4, with up to three &#34;1&#34; bits encoding: 
     
         W=2.sup.Q +I, SF=[s.sub.0 . . . s.sub.W-1 ]. 
    
     Let C be the number of &#34;1&#39;s&#34; in the subframe SF; and let Loci be the location of the S i   th  bit that is equal to &#34;1&#34; in subframe SF. Going from left to right; e.g., for Q=4, I=4 in a 20-bit sample [0001 0000 0001 0100 0000], there are three &#34;1&#39;s&#34; respectively located at the s 3 ,s 11 , and s 13  bit locations. So, C=3 and Loc1=3, Loc2=11, and Loc3=13. Consider, also, instead of a straight (e.g., C=0, E 0  =[00]; C=1, E 1  =[01]; C=2, E 2  =[10]; and C=3, E 3  =[11]) encoding of the count number C, a different, uniquely decipherable (going from left to right) variable bit-length encoding scheme, such as C=0, E 0  =[0001]; C=1, E 1  =[01]; C=2, E 2  =[001]; and C=3, E 2  =[0000] and, for all uncompressed instances, E 4  =[1];. Given the subframe SF, encoding can then be done, for example, according to the following rules: 
     If C=0, CSF=[0001]; where [0001]=E 0 . 
     If C=1 and Loc1≧I, then CSF=[01x 1  . . . x Q  ]; where, e.g., [01]=E 1  and where [x 1  . . . x Q  ] is the binary encoding of Loc1. 
     If C=2, Loc2-Loc1≦2 Q , Loc2≧I j  ; then CSF=[001x 1  . . . x Q  y 1  . . . y Q  ]; where [001]=E 2 , xLoc=W-1-Loc2 with [x 1  . . . x Q  ] being the binary encoding of xLoc; and yLoc=Loc2-Loc1-1 with [y 1  . . . y Q  ] being the binary encoding of yLoc. 
     If C=3, Loc3-Loc2≦2 Q , Loc2-Loc1≦Q, and Loc3≧I j  ; then CSF=[0000x 1  . . . x Q  y 1  . . . y Q  z 1  . . . z Q  ]; where [0000}=E 3 , [x 1  . . . x Q  ] is the binary encoding of xLoc=W-1-Loc3, [y 1  . . . y Q  ] is the binary encoding of yLoc=Loc3-Loc2-1, and [z 1  . . . z Q  ] is the binary encoding of zLoc=Loc2-Loc1-1. 
     For all other cases, if none of the above conditions is satisfied, then CSF=[1s 0  . . . s W-1  ]; where [1]=E 4 . 
     The number count encoding is preferably chosen, as done above for E 0  through E 4 , using a set of uniquely decipherable codes. The exemplary series 0001, 01, 001, 0000 and 1 meet this criterion by providing unambiguous deciphering in detecting the first &#34;1&#34; moving from left to right. A &#34;1&#34; in the first bit position immediately and unambiguously identifies E 4  ; a &#34;1&#34; in the second position, E 1  ; a &#34;1&#34; in the third position, E 2  ; a &#34;1&#34; in the fourth position, E 0  ; and the absence of a &#34;1&#34; after four bit positions, E 3 . Those skilled in the art to which the invention relates will appreciate that the particular number count encoding scheme can be varied, and that other number location identification schemes are also possible. 
     FIG. 8 summarizes the flow of steps in the compression procedure of the described data compression method. The procedure flow for recovering the original record F from the compressed record OF is shown in FIG. 9. The output frames OF 1  through OF N  are retrieved; all compressed CSF subframes are expanded to their uncompressed SF counterparts; the original ordered XF frame is then reconstructed from the restored SF record, using the index array R to reorder the bit positions; and, finally, the original F record is recovered by applying the same exclusive-OR operation on the XF record that was performed on the F record to obtain the XF record in the first place, i.e. F1=XF1 and F j  =XF j  ⊕XF j-1  for j=2 to N. 
     FIGS. 10 through 16 show the application of the procedure flow of FIG. 8 to achieve compression of a record F having eight frames F 1  through F 8  of 16-bits each. The starting bit positions are indicated as 1 through 16 in FIG. 10. To get corresponding XORed frames XF 1  through XF 8 , the 16 bits of frame F 1  are used as the 16 bits of the frame XF 1  and the XOR operation is applied to corresponding bits of the frames and prior frames for F 2  through F 8  to construct the frames XF 2  through XF 8 . Activity vector A is then constructed by exanination of the value change activity of each bit position 1 through 16. For implementations which divide the base frame XF 1  into subframes SF and apply compression to those subframes, the &#34;1&#39;s&#34; in the base frame should be counted as flips. However, where, as here, the bit values of the base frame will be transferred directly to the output record base frame without compression, the occurrences of &#34;1&#34; in the base frame can be counted, or not. The activity vector A in FIG. 12 was derived counting the base frame XF 1  &#34;1&#39;s&#34; as &#34;flips.&#34; Next, the array A is sorted by ascending number of &#34;flips,&#34; into the sorted array SA shown in FIG. 13. The bit locations of the bit positions in the sorted array are then used to construct the reordering index R of FIG. 14. (For clarity, the numbers in FIGS. 12-14 are given as decimals, though it is understood that the actual implementations will use corresponding binary representations.) FIG. 15 shows the reordered frames XF 1  through XF 8 , still each with 16 bits; however, with the bit patterns reordered according to the priorities established by the index R of FIG. 14. The reordered frame XF 1  is not divided into subframes. The reordered frames XF 2  through XF 8  are divided into two eight-bit subframes SF 1j  and SF 2j  each. The output record OF is then constructed with output frame OF 1  defined by the 16-bit pattern of reordered frame XF 1  and the remaining frames OF 2  through OF 8  are established by applying a bit-location compression scheme to the first subframes SF 1j  but not to the second subframes SF 2j . The compression is shown in FIG. 16 for a uniquely decipherable number count encoding scheme of C=0, E 0  =[00]; C=1, E 1  =[01]; and C≧2, E 2  =[1]; and a sequential three-bit location identification scheme to identify the eight bit locations as [000] through [111]. The results of applying the compression are shown in FIG. 16. The bit savings is 15 bits over a total sample of 128 bits, chosen randomly but with some short term constancy from frame to frame. The savings for similar statistical compressions applied to much larger encoded speech records, having many more frames and much longer bit streams per frame, is expected to be even better. 
     Determining the values of W t  : 
     A reasoned approach can be taken in deciding what parameters are appropriate. Given a number of speech frame/records representative of an application such as the shown digital telephone answering device, for instance, for each of those records, the maximum number of subframes SF can be chosen to be L=M/Wmin, where Wmin is typically 8. For example, if M=56, L=7, and Wmin=8, then, for all subframes of width W i  ε[8, 16, 20, 24, 32] that start at bit s i  of the frame XF j , where i=p*8 for p=0, 1,etc., the histogram (pdf or probability distribution finction) is obtained of the count C of the number of &#34;1&#39;s&#34; in each subframe of width W i . A typical pdf may look something like that shown in FIG. 17. Selecting E 0  -E 4  depends on the pdf of each subframe. Different selections of E&#39;s will generate different numbers of bits for each case or value of C. Different encodings can be tried based on the shape of the pdf. Shorter codes are assigned higher P.sub.(n). 
     Given the illustrated pdf, and for the two encoding schemes Case 1 and Case 2, above, the number of bits (nb) used to encode each count is known, as follows: 
     Case 1 (Q=4, W=16): 
     For C=0 and E 0  =[00], CSF=[00], and the number of encoding bits nb(0)=2 (which represents 14 fewer bits than in the original). 
     For C=1 and E 1  =[01], CSF=[01x 1  x 2  x 3  x 4  ] and nb(1)=6 (10 fewer bits). 
     For C=2 and E 2  =[10], CSF=[10x 1  x 2  x 3  x 4  y 1  y 2  y 3  y 4  ] and nb(2)=10 (6 fewer bits). 
     And, for C≧3 and E 3  [11], CSF=[11s 0  . . . s 15  ] and nb(3)=18 (2 more bits). 
     Case 2 (Q=4, I=4, W=20): 
     For C=0 and E 0  =[0001], CSF=[0001], and the number of encoding bits nb(0)=4 (which represents 16 fewer bits than in the original). 
     For C=1 and E 1  =[01], CSF=[01x 1  x 2  x 3  x 4  ] and nb(1)=6 (14 fewer bits). 
     For C=2 and E 2  =[001], CSF=[001x 1  x 2  x 3  x 4  y 1  y 2  y 3  y 4  ] and nb(2)=11 (9 fewer bits). 
     For C=3 and E 3  =[0000], CSF=[0000x 1  x 2  x 3  x 4  y 1  y 2  y 3  y 4  z 1  z 2  z 3  z 4  ] and nb(3)=16 (4 fewer bits). 
     And, for C&gt;3 and E 4  =[1], CSF=[1s 0  . . . s 19  ] and nb(4)=21 (1 more bit). For each encoding scheme, W eff  is then calculated: ##EQU3## where nb(n) is the number of bits used to encode a subframe. 
     For all subframes and for each encoding scheme, W eff .sbsb.average is then found. For all combinations of subframes, such that ##EQU4## and all bits are covered, the total ##EQU5## is then determined. This process is repeated for all speech records, and the combination of subframes that results in the minimum W eff .sbsb.average Tot  average is selected for encoding. 
     Experiments 
     Experiments were conducted with MELP encoded speech records using five representative speech records having M=56 bits per frame, varying the number of frames per record used in gathering statistics, from N=100 to N=1088. The top two combinations were W 0  =16, W 1  =16, W 2-5  =0 and W 6  =24, with W eff   Tot  =47.7 and encoding Case 1, above, used for W 0  and W 1  and none for W 6  ; and W 0  =16, W 1  =20, W 2-5  =0 and W 6  =20 with W eff   Tot  =47.2 and encoding W 0  with Case 1, above, and Case 2, above, and W 6  with no encoding. Simulations carried out in MATLAB© indicated about 15% savings in storage requirement. This means that the amount of required memory can be reduced or additional speech time can be stored in the same amount of memory. 
     Particularly for off-line storage, the recompression scheme can be run when the processor is in an idle mode. The overhead for the demonstrated recompression mechanism was only one frame of speech and one index vector for each 112 bits of conventional speech storage. The additional memory overhead to store the copy of speech before compressing can be cut by using the segmented approach presented above. This also gives better savings. The specific implementation discussed above, by way of example, is a very basic encoding procedure, and it will be appreciated that modifications are possible which may produce even greater savings.