# Patent

## Title
Data compression by multi-order differencing

## Abstract

Embodiments of the present invention enable compression and decompression of data. Applications of the present invention are its use in embodiments of systems for compression and decompression of GPS long-term Ephemeris (LTE) data, although the present invention is not limited to such applications. In embodiments, the LTE data may be grouped into a set of data values associated with a parameter. In embodiments, a data set may be compressed by using a multi-order differencing scheme. In such a scheme, a set of the differences between values may be compressed because the differences have smaller magnitudes than the values. In embodiments, a multi-order differencing scheme determines how many levels (orders) of differencing may be applied to an original data set before it is compressed. In embodiments, the original data may be recovered from a compressed data set based on the type of multi-order differencing scheme used to generate the compressed data.

## Background
BACKGROUND
A. Technical Field
The present invention pertains generally to data processing, and relates more particularly to data compression and decompression.
B. Background of the Invention
Data compression is the encoding of a data set so that fewer bits are necessary to represent the encoded data. Data compression is important for data communication, because the smaller compressed data sets require fewer resources for storage and also require less bandwidth for data transmission than would be required for the original uncompressed data sets.
Efficient data compression should address key issues. For example, it is possible to employ a data compression scheme that will result in information loss as the data are encoded. To maintain precision, a lossless data compression scheme is required. Data compression processing may require a large amount of computing resources such as memory, and the computing resources requirement may not scale when large data sets are being compressed. It is important for an application to employ efficient data compression methods in order to avoid excessive computing resources requirements.
In order to use data in a compressed data set, the compressed data set must first be decompressed (decoded). Data decompression is based on the same scheme that was used for data compression. In a typical communication system, a client device performs data compression on a transmitted compressed data package that it has received. Recently, a large variety of consumer electronics devices are being used as client devices, and these devices have limited computing resources. It is important that a data decompression scheme be both lossless and efficient to enable the widest variety of client devices to be used in data communication.
SUMMARY OF THE INVENTION
Embodiments of the present invention enable compression and decompression of data. Applications of the present invention are its use in embodiments of systems for compression and decompression of GPS long-term Ephemeris (LTE) data, although the present invention is not limited to such applications. In embodiments, the LTE data may be grouped so that each group contains the data values of a parameter that are taken at different recording timings for a given satellite. In embodiments, the ordered data set associated with each group may be compressed individually according to a compression scheme based on the distribution of the values within the group. In embodiments, an ordered data set may be compressed by using a multi-order differencing scheme. In such a scheme, a set of the differences may be compressed instead of the original values because the differences have much smaller magnitudes than the original values. More than one level (order) of differences may be applied to a data set. In embodiments, a multi-order differencing scheme determines how many levels (orders) of differencing may be applied to an original data set before it is compressed. In embodiments, the particular scheme being applied may be determined by data type, parameter type, and distribution of the original or difference values. In embodiments, the original data may be recovered from a compressed data set based on the type of multi-order differencing scheme used to generate the compressed data.
In embodiments, a method for compressing data may comprise designating the data as a working set of values; designating at least one reference value within the working set of values; generating a set of difference values using the working set of values; evaluating at least one condition based on at least one characteristic of the set of difference values; generating a set of difference values using the working set of values; and evaluating at least one condition base on at least one characteristic of the set of difference values. If the condition(s) are not satisfied, the set of difference values may be designated as the working set of values and the preceding steps are repeated. If the condition(s) are satisfied, the method may comprise determining at least one reference value bit length to encode the reference value(s); determining at least one difference value bit length to encode at least some of the difference values within the set of difference values; and storing a compressed data record according to a predefined schema. In embodiments, the compressed data record may comprise at least one reference value bit length, at least one difference value bit length, at least one reference value, and the set of difference values.
In embodiments, a characteristic of the set of difference values may be a variance and a condition being satisfied may be the variance being less than a threshold value. In embodiments, the step of determining at least one difference value bit length to encode a set of difference values may comprise calculating a first difference value bit length. In embodiments, the step of determining at least one difference value bit length may comprise dividing the set of difference values into subsets, each subset being associated with a corresponding bit length, and encoding each difference value using its associated bit length so that the compressed data record will be smaller than if one bit length were used to encode the set of difference values. In embodiments, the step of determining at least one difference value bit length to encode a first set of difference values may comprise designating a first difference value bit length to encode the first set of difference values; designating a second difference value bit length that is shorter than the first difference value bit length by an increment bit length; calculating a bit length threshold based on the second difference value bit length; assigning at least one difference value within the first set of difference values to a second set of difference values if the difference value is less than the bit length threshold; calculating a space savings measure based on the size of the first set of difference values and the size of the second set of difference values; and using the second difference value bit length; designating the space savings measure as the maximum space savings measure if it is greater than the maximum space savings measure, and designating the second difference value bit length as an optimum bit length, and the second set of difference values as the associated second set of difference values; decrementing the increment bit length by a decrement value; repeating the previous steps if the increment bit length is greater than zero; and using the optimum difference value bit length to encode the difference values within the associated second set of difference values.
In embodiments, the data may be associated with a parameter. In embodiments, the step of designating at least one reference value is based on the type of the parameter. In embodiments, the difference between values is based on the type of the parameter. In embodiments, the data may be GPS data and the parameter is within a set of ephemeris parameters. In embodiments, the compressed data record is stored according to the parameter.
In embodiments, a method for compressing data may comprise determining at least one reference value and a set of difference values; determining at least one reference value bit length to encode at least one reference value; determining at least one difference value bit length to encode at least some of the difference values within the set of difference values; and storing a compressed data record according to a pre-defined schema. In embodiments, the compressed data record may comprise at least one reference value bit length, at least one difference value bit length, at least one reference value, and the set of difference values.
In embodiments, determining at least one reference value and the set of difference values may comprise designating a first reference value from the data; and calculating a first set of difference values using the data. In embodiments, at least one reference value may comprise the first reference value and the first set of difference values is the set of difference values.
In embodiments, the step of determining at least one reference value and the set of difference values may further comprise designating a second reference value from the first set of difference values; and calculating a second set of difference values using the first set of difference values. In embodiments, at least one reference value may comprise the first and second reference values and the second set of difference values is the set of difference values.
In embodiments, the step of determining at least one reference value and the set of difference values may further comprise designating a second reference value and a third reference value from the first set of difference values; and calculating a second set of difference values comprising two subsets of difference values wherein one subset of difference values is associated with the second reference value and the other subset of difference values is associated with the third reference value. In embodiments, the values in the first set of difference values are associated with an order and one subset of difference values is obtained from a set of values comprising every other value in the first set of difference values and the other subset of difference values is obtained from the remaining, every other values in the first set of difference values. In embodiments, at least one reference value comprises the first, the second, and the third reference values; and the second set of difference values is the set of difference values.
In embodiments, the step of calculating a second set of difference values using the first set of difference values may comprise calculating a second set of difference values between the second reference value and the remaining values in the first set of difference values. The method may further comprise designating a third reference value and a fourth reference value from the second set of difference values; calculating a third set of difference values comprising two subsets of difference values where one subset of difference values is associated with the third reference value and the other subset of difference values is associated with the fourth reference value; designating a fifth reference value, a sixth reference value, a seventh reference value, and an eighth reference value from the third set of difference values; calculating a fourth set of difference values comprising four subsets of difference values where a first subset of difference values is associated with the fifth reference value, a second subset of difference values is associated with the sixth reference value, a third subset of difference values is associated with the seventh reference value, and a fourth subset of difference values is associated with the eighth reference value; and where at least one reference value comprises the first, second, third, fourth, fifth, sixth, seventh, and eight reference values; and the fourth set of difference values is the set of difference values.
In embodiments, calculating a second set of difference values between the second reference value and the remaining values in the first set of difference values may comprise, for each difference value in the second set of difference values, determining a first difference value using a value from the first set of differences and the second reference value; determining a second difference value using the value from the first set of differences and the second reference value by inverting the sign of either the value from the first set of differences or the second reference value; including in the second set of difference values the difference value from the first and the second difference values with the smaller absolute value; and associating with the included difference value whether the sign of either the second reference value or the value from the first set of differences that generated the included difference value was inverted.
In embodiments, the step of determining at least one reference value and the set of difference values may comprise designating a first, second, third, and fourth reference value from the data; calculating a first set of difference values comprising four subsets of difference values where a first subset of difference values is associated with the first reference value, a second subset of difference values is associated with the second reference value, a third subset of difference values is associated with the third reference value, and a fourth subset of difference values is associated with the fourth reference value; designating a fifth, sixth, seventh, and eighth reference value within the first set of difference values; calculating a second set of difference values comprising four subsets of difference values where a fifth subset of difference values is associated with the fifth reference value, a sixth subset of difference values is associated with the sixth reference value, a seventh subset of difference values is associated with the seventh reference value, and an eighth subset of difference values is associated with the eighth reference value; designating a ninth reference value from the second set of difference values; calculating a third set of differences using the second set of difference values; and where at least one reference value comprises the first, second, third, fourth, fifth, sixth, seventh, eighth, and the ninth reference values; and the third set of difference values is the set of difference values.
In embodiments, the step of determining at least one reference value bit length may comprise calculating whether fewer bits are required to encode at least one of the reference values if more than one reference value bit length is used; and selecting a minimum reference value bit length to encode at least one reference value if fewer bits are required to encode at least one reference value. In embodiments, the reference values may be associated with an order level. In embodiments, the step of determining at least one difference value bit length may comprise calculating whether fewer bits are required to encode at least one of the difference values within the set of difference values if more than one difference value bit length is used; and selecting a minimum difference value bit length to encode at least one difference value if fewer bits are required to encode at least one of the difference values within the set of difference values.
In embodiments, a method for compressing data may comprise associating a multi-order difference scheme with a parameter; identifying a set of data values from the data that are associated with the parameter; and using the multi-order difference scheme associated with the parameter to compress the set of data values. In embodiments, the set of data values represents the 0-th order and the values comprising each subsequent order after the 0-th order are obtained from taking differences of values from the immediately prior orders. In embodiments, a data file format is associated with the multi-order scheme.
In embodiments, the multi-order difference scheme may comprise for each order that is not the last order in the multi-order scheme, designating at least one reference value from the values in that order; for the last order in the multi-order scheme, generating a set of difference values using values from the preceding order; and storing at least one reference value and the set of difference values according to a format associated with the multi-order difference scheme. In embodiments, the set of values in at least one of the non 0-th orders in the multi-order scheme are obtained by determining a first difference value using a value from a set of values and a reference value, where the set of values and the reference value are obtained from the immediately prior order; determining a second difference value using the value from the set of values and the reference value by inverting the sign of either the value from the set of differences or the reference value; including in the set of values for an order the difference value from the first difference value and the second difference value, the difference value having a smaller absolute value; and associating with the included difference value whether the sign of either the reference value or the value from the set of differences that generated the included difference value was inverted. In embodiments, the method may further comprise determining at least one bit length to encode at least some of the values for at least one of the orders. In embodiments, a plurality of bit lengths is used to reduce the size of the compressed set of data values.
In embodiments, the values in at least one of the orders in the multi-order scheme are obtained by identifying modes within the values of an immediately prior order; and for each identified mode, selecting a reference value and calculating a set of differences using the reference values and the value associated with the identified mode. In embodiments, the data comprises data for a plurality of parameters and at least some of the parameters have an associated multi-order scheme. In embodiments, the data is GPS data and the parameter is within a set of ephemeris parameters. In embodiments, the data comprises GPS data for a plurality of satellites, and the data are ordered according to each satellite within the plurality of satellites.
In embodiments, a method for decompressing a compressed data record comprising an ordered set of data values associated with a parameter within a set of parameters may comprise extracting at least one bit length from the compressed data record; extracting at least one reference value and a set of difference values from the compressed data record based on the bit length(s) and the parameter; and decompressing the compressed ordered set of data values based on the reference value(s) and the set of difference values. In embodiments, the set of parameters comprises GPS ephemeris data values associated with a satellite.
In embodiments, the step of decompressing the compressed ordered set of data values may comprise extracting a first reference value and a first set of difference values that are associated with a first parameter; and calculating a first decompressed value by adding a first difference value from the first set of difference values to the first reference value. In embodiments, the first parameter has an associated decompression scheme. In embodiments, the decompression scheme is associated with a compression scheme.
In embodiments, a system for compressing a set of data values associated with a parameter may comprise a difference calculator, coupled to receive a working set of values, that generates a set of difference values comprised of at least one difference between values within the working set of values; a bit length calculator, coupled to received at least one reference value within the working set of values and the set of difference values, that determines at least one reference value bit length to encode at least one reference value and at least one difference bit length to encode at least some of the set of difference values; and a data record generator, coupled to receive the set of difference values, that performs an evaluation of at least one condition based on at least one characteristic of the set of difference values and generates a compressed data set in response to satisfaction of the condition(s).
In embodiments, a system for decompressing a compressed data record comprising an ordered set of data values associated with a parameter with a set of parameters may comprise a value extractor, coupled to receive the compressed data record, that extracts at least one reference value and a set of difference values from the compressed data record; and a value calculator, coupled to receive at least one reference value and the set of difference values, that calculates an uncompressed ordered set of data values based on the reference value(s) and the set of difference values.
Some features and advantages of the invention have been generally described in this summary section; however, additional features, advantages, and embodiments are presented herein or will be apparent to one of ordinary skill in the art in view of the drawings, specification, and claims hereof. Accordingly, it should be understood that the scope of the invention shall not be limited by the particular embodiments disclosed in this summary section.



BRIEF DESCRIPTION OF THE DRAWINGS
Reference will be made to embodiments of the invention, examples of which may be illustrated in the accompanying figures. These figures are intended to be illustrative, not limiting. Although the invention is generally described in the context of these embodiments, it should be understood that the scope of the invention is not limited to these particular embodiments.
FIG. 1 illustrates an exemplary GPS data package.
FIG. 2A depicts a block diagram of a system for compressing data according to various embodiments of the invention.
FIG. 2B depicts a block diagram of a system for decompressing a compressed data set according to various embodiments of the invention.
FIG. 3 depicts a method for compressing data according to various embodiments of the invention.
FIG. 4 depicts a method for compressing data in which the values are within a defined set of values according to various embodiments of the invention.
FIG. 5 depicts a method for compressing data in which the values are distributed close together according to various embodiments of the invention.
FIG. 6 depicts another method for compressing data according to various embodiments of the invention.
FIG. 7 depicts a method for determining at least one bit length for encoding a set of values according to various embodiments of the invention.
FIG. 8 depicts another embodiment of a method for compressing data according to various embodiments of the invention.
FIG. 9 depicts yet another method for compressing data according to various embodiments of the invention.
FIG. 10 depicts another method for compressing data according to various embodiments of the invention.
FIG. 11 illustrates ordering of data within a compressed GPS data package according to various embodiments of the invention.
FIG. 12 depicts a method for decompressing a compressed data set according to various embodiments of the invention.
FIG. 13 depicts a block diagram of a computing system, according to various embodiments of the present invention.



DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Embodiments of the present invention enable compression and decompression of data. Applications of the present invention are its use in embodiments of systems for compression and decompression of GPS long-term Ephemeris (LTE) data, although the present invention is not limited to such applications. In embodiments, the LTE data may be grouped so that each group contains the data values of a parameter that are taken at different recording timings for a given satellite. In embodiments, the ordered data set associated with each group may be compressed individually according to a compression scheme based on the distribution of the values within the group. In embodiments, an ordered data set may be compressed by using a multi-order differencing scheme. In such a scheme, a set of the differences may be compressed instead of the original values because the differences have much smaller magnitudes than the original values. More than one level (order) of differences may be applied to a data set. In embodiments, a multi-order differencing scheme determines how many levels (orders) of differencing may be applied to an original data set before it is compressed. In embodiments, the particular scheme being applied may be determined by data type, parameter type, and distribution of the original or difference values. In embodiments, the original data may be recovered from a compressed data set based on the type of multi-order differencing scheme used to generate the compressed data.
In the following description, for purposes of explanation, specific details are set forth in order to provide an understanding of the invention. It will be apparent, however, to one skilled in the art that the invention can be practiced without these details. Furthermore, one skilled in the art will recognize that embodiments of the present invention, described below, may be implemented in a variety of ways, including software, hardware, or firmware, or a combination thereof. Accordingly, the flow charts described below are illustrative of specific embodiments of the invention and are meant to avoid obscuring the invention.
Components, or modules, shown in block diagrams are illustrative of exemplary embodiments of the invention and are meant to avoid obscuring the invention. It shall also be understood that throughout this discussion that components may be described as separate functional units, which may comprise sub-units, but those skilled in the art will recognize that the various components, or portions thereof, may be divided into separate components or may be integrated together, including integrated within a single system or component.
Furthermore, connections between components within the figures are not intended to be limited to direct connections. Rather, data between these components may be modified, re-formatted, or otherwise changed by intermediary components. Also, additional or fewer connections may be used. It shall also be noted that the terms “coupled” or “communicatively coupled” shall be understood to include direct connections, indirect connections through one or more intermediary devices, and wireless connections.
Reference in the specification to “one embodiment,” “preferred embodiment” or “an embodiment” means that a particular feature, structure, characteristic, or function described in connection with the embodiment is included in at least one embodiment of the invention and may be in more than one embodiment. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.
A. Overview
One specific application of the present invention is its use in embodiments of systems for compression and decompression of GPS long-term Ephemeris (LTE) data. These embodiments will be described for illustrative purposes and not for limitation. One skilled in the art shall recognize the general applicability of the present invention.
With the rapid technical development in the recent decade, the Global Positioning System (GPS) has been widely used for navigation and other applications requiring precise positioning. GPS functionality has been incorporated into many types of consumer electronic devices, especially portable devices such as cell phones. Due to limited bandwidth, the GPS data typically are compressed before transmitting them to a client device from a server, and they are decompressed on the client device when they are received. Therefore, it is important to develop an efficient scheme for both compression of GPS data on the server side and decompression of the compressed data on the client side. Since client devices, such as cell phones, often have limited resources, the scheme for compression and decompression should be designed so that the consumption of memory and other resources on the client side is as low as possible. To maintain the precision of positioning, the compression/decompression should be lossless.
A typical GPS data package contains the motion data of a number of satellites over a period of two weeks. A new set of motion data is recorded at a satellite every six hours (a “timing”); four sets of motion data are recorded per satellite per day. A GPS data package covering a two-week period thus covers fifty-six timings and includes fifty-six sets of data per satellite.
The motion data being recorded are called long-term Ephemeris (LTE) data. A typical LTE data set includes 21 parameters (“fields”). A description of these parameters and their value ranges are listed in the following table.







TABLE 1







LTE data parameters.









Variable
Bit Length
Description












satid
8
Satellite id




value range: 0~31


uraidx
8
URA Index for SV Accuracy




value range: 0~15


e
32
Eccentricity




value range: 0~4294967295[dimension-less]


asqrt
32
Square Root of the Semi-Major Axis




value range: 0~4294967295[meters1/2]


omega0
32
Longitude of Ascending Node of Orbit Plane at




Weekly Epoch value range:




−2147483648~2147483647[semi-circles]


omegadot
24
Rate of Right Ascension




value range: −8388608~8388607[semi-circles/sec]


i0
32
inclination angle as reference time




value range: −2147483648~2147483647[semi-




circles]


deltan
16
Mean Motion Difference From Computed Value




value range: −32768~32767[semi-circles/sec]


idot
14
rate of inclination angle




value range: −8192~8191[semi-circles/sec]


m0
32
mean anomaly at reference time




value range: −2147483648~2147483647[semi-




circles]


omega
32
Argument of Perigee




value range: −2147483648~2147483647[semi-




circles]


crs
16
amplitude of sin correction to orbit radius




value range: −32768~32767[meters]


crc
16
amplitude of cos correction to orbit radius




value range: −32768~32767[meters]


cus
16
amp of sin corr to argument of latitude




value range: −32768~32767 [radians]


cuc
16
amp of cos corr to argument of latitude




value range: −32768~32767 [radians]


cis
16
amp of sin corr to inclination angle




value range: −32768~32767 [radians]


cic
16
amp of cos corr to inclination angle




value range: −32768~32767 [radians]


af0
22
0th order polynomial coefficient




value range: −2097152~2097151 [sec]


af1
16
1st order polynomial coefficient




value range: −32768~32767 [sec/sec]


af2
8
2nd order polynomial coefficient




value range: −128~127 [sec/sec2]


health
1
health data for this satellite




0: health




1: unhealth









An exemplary GPS data package contains LTE data recorded over a two-week period from 31 satellites; thus, the package contains 56*31*21 integer values. FIG. 1 illustrates a typical ordering of such an LTE data package. The data are ordered by timing. Each of the 14 days 105 contains the values of the 21 LTE data parameters 120 recorded at each of 4 timings 110 for each of 31 satellites 115.
There may be a strong correlation among the values that have been recorded at different timings for a parameter for a given satellite. In embodiments of the invention, the type and extent of this correlation may provide the basis for achieving a high compression rate for the set of LTE data recorded for each of the satellites.
In embodiments, the LTE data may be grouped so that each group contains the data values of a parameter that are taken at different recording timings for a given satellite. In the LTE data example illustrated in FIG. 1, there are 31 satellites, 21 parameters, and 56 recording timings. These data are divided into 31*21 groups, each of which contains 56 values recorded at the 56 timings. In embodiments, the data associated with each group may be compressed individually according to a compression scheme based on the distribution of the 56 values within the group.
There are certain parameters whose recorded values do not vary across multiple timings. Because there is little to no variability within the values associated with this type of parameter, compression of the group of values need not be based upon correlation. For example, the value of parameter “af2” is always 0 (those skilled in the art will recognize that this parameter is not currently used) so, in embodiments, it is unnecessary to record it in a compressed LTE data set since the value need not be transmitted. The values of parameter “satid” (satellite ID) are different across satellites, but identical at all the recording timings for a given satellite. Thus, in embodiments, only one set of its 31 values needs to be included in a compressed LTE data record. Since this set of values refers to different satellites, there may not be any correlation among them and thus they are included in the data record without further compression.
B. System Implementations
FIG. 2A depicts a system 200A for generating a compressed data set 225 from data 205 according to various embodiments of the invention. System 200A comprises a difference calculator 210, a bit length calculator 215, and a data record generator 220. In embodiments, data 205 may be a set of original data values for a single LTE parameter that have been recorded from a single satellite.
In embodiments, data 205 may be compressed by using a multi-order differencing scheme. In such a scheme, a set of the differences between the original values may be compressed instead of the original values because the differences have much smaller magnitudes than the original values. More than one level (order) of differences may be applied to a data set. For example, the difference between two original parameter values is a first-order difference, and the difference between two first-order differences is a second-order difference. In embodiments, a multi-order differencing scheme determines how many levels (orders) of differencing may be applied to an original data set before it is compressed. In embodiments, the scheme being applied may be determined by the type of data, parameter type, and/or variance of original or difference data values.
In embodiments, difference calculator 210 generates a set of difference values by computing differences between values within a working set of values. The working set of values may contain original values (this would generate a set of first-order difference values), or it may contain difference values (this would generate a set of difference values at a higher order than the difference values within the working set). The type of multi-order differencing scheme being applied may determine how differences are computed. For example, differences may be computed between neighboring values, between every two values, or between every four values within the working set of values.
Each time a set of difference values is generated, at least one reference value is identified from the working set of values. The type of multi-order differencing scheme being applied may determine the number of reference values being identified. For example, one reference value may be identified from a working set within which differences between neighboring values are being computed.
In embodiments, bit length calculator 215 computes at least one bit length to encode the identified reference values from the working set and at least one bit length to encode each of the difference values within the generated set of difference values. In embodiments, bit length computation may be based on at least some of these factors: the type of multi-order differencing scheme, the order level of the values in the working set, the order level of the difference values, and the distribution of difference values within the set of difference values.
In embodiments, data record generator 220 generates a compressed data set 225 representing the data 205. An exemplary compressed data set 225 may contain at least one bit length to encode each of the reference values, at least one bit length to encode a set of difference values, the reference values, and the set of difference values. The data within a compressed data set 225 are ordered according to a pre-defined schema. An exemplary compressed GPS LTE data package would contain 31*21 compressed data sets 225. The data sets within the package may be ordered according to a second pre-defined schema to maximize efficient use of resources on a client device during decompression.
FIG. 2B depicts a system 200B for generating uncompressed data 205 from compressed data 225 according to various embodiments of the invention. System 200B comprises a value extractor 230, and a value calculator 235. In embodiments, compressed data set 225 may be a compressed set of original data values for a single LTE parameter that have been recorded from a single satellite.
In embodiments, value extractor 230 extracts data values from the compressed data set 225 according to the same pre-defined schema used in the compression system 200A to order the data in the compressed data set 225. For example, value extractor 230 may extract at least one bit length to encode the reference values and at least one bit length to encode a set of difference values, and then use the reference value bit lengths to extract the reference values, and use the at least one difference value bit length to extract the set of difference values.
In embodiments, value calculator 235 computes the original data 205 based on the extracted reference values and the set of difference values from the compressed data set 225, as well as on the type of multi-ordered differencing scheme used by system 200A to generate the compressed data set 225. Methods for restoring an original ordered data set 205 from a set of extracted reference values and difference values will be discussed in detail within the following sections.
C. Methods for Data Compression Using Multi-Order Differencing
FIG. 3 depicts a method 300 for compressing data according to various embodiments of the invention. Method 300 may be implemented in embodiments of system 200A.
In embodiments, data 205 may be compressed by using a multi-order differencing scheme. In such a scheme, a set of the differences may be compressed instead of the set of the original values because the differences have much smaller magnitudes than the original values. More than one level (order) of differences may be applied to a data set. In embodiments, a multi-order differencing scheme determines how many levels (orders) of differencing may be applied to an original data set before it is compressed. In embodiments, the scheme being applied may be determined by the type of data, parameter type, and/or variance of original or difference data values.
Initially, the set of original values is used 305 as the working set of values. One or more values within the set are designated 310 as reference values. In embodiments, the selected values may be determined by the data type, parameter type, and/or type of multi-order differencing scheme being applied. A set of difference values between values within the working set of values is calculated 315. The type of multi-order differencing scheme being applied determines between which values within the working set of values each difference value is calculated. For example, in various embodiments differences may be calculated between neighboring values, between every two values, or between every four values. One skilled in the art shall recognize that other differencing configurations may be used.
At least one condition is evaluated 320 in order to determine whether another level (order) of differences may be calculated. Exemplary conditions include the current order of difference values within the set of difference values (for example, the difference between two original parameter values is a first-order difference, and the difference between two first-order differences is a second-order difference) and the type of multi-order differencing scheme being applied. Additional exemplary conditions may be based upon at least one characteristic of the set of difference values, such as a comparison of the variance of the set of difference values to a threshold value. In embodiments, this condition is satisfied if the variance is less than the threshold value. Those skilled in the art will recognize that a variety of conditions may be used.
If the condition or conditions are not satisfied, the set of difference values is used 325 as the working set of values, and another order of differences is computed by repeating steps 310 through 320.
If the condition or conditions are satisfied, bit lengths are determined 330 to encode each of the identified reference values. For example, in embodiments the bit length for encoding more than one reference value associated with a particular working set is the bit length that encodes the maximum of the set of reference values. In embodiments, if a bit length is associated with an original value, that bit length may be used for one or more reference values.
At least one bit length is computed 335 for encoding each of the difference values within the set of difference values. In embodiments, the computation of this bit length may be based on factors such as the type of multi-order differencing scheme being applied and at least one characteristic of the set of difference values. This computation will be discussed in more detail within the following sections.
A compressed data set 225 comprises the determined bit lengths, the reference values, and the set of difference values, ordered 340 according to a pre-defined schema.
The following sections describe various embodiments of method 300 used to compress data by applying a multi-order differencing scheme associated with the data distribution pattern characteristic of the data within the data set. For purposes of illustration and not limitation, each type of multi-order differencing scheme is described in terms of its application to the compression of a GPS LTE data set associated with some of the exemplary parameters listed in Table 1.
1. A First Embodiment of a Method for Compression of Data
FIG. 4 depicts a method 400 for compressing data 205 according to various embodiments of the invention. An exemplary set of 56 data values 205 is associated with the GPS parameter “health” (See Table 1). Each of the data values associated with “health” has a value of either 0 or 1 and often the values within the set of values are constant.
In embodiments, an original value is designated 405 as a first reference value. A set of first-order difference values is calculated 410 between neighboring original values according to the following equation:

=Di1=Di0−Di−10, i=2, . . . , 56  (1)

where Di0 is the ith original value, and Di1 is the ith first-order difference. In this example, D10 is designated as the first reference value.
The bit length Bj to encode the difference values for order j is calculated 415 according to the following equation:




  
    
      
        
          B
          j
        
        =
        
          {
          
            
              
                
                  
                    
                      ceil
                      ⁡
                      
                        (
                        
                          
                            log
                            2
                          
                          ⁡
                          
                            (
                            
                              
                                max
                                ⁡
                                
                                  (
                                  
                                    
                                    
                                      D
                                      j
                                    
                                    
                                  
                                  )
                                
                              
                              +
                              1
                            
                            )
                          
                        
                        )
                      
                    
                    +
                    1
                  
                  ,
                  
                    
                      max
                      ⁡
                      
                        (
                        
                          
                          
                            D
                            j
                          
                          
                        
                        )
                      
                    
                    >
                    0
                  
                
              
            
            
              
                
                  0
                  ,
                  
                    
                      max
                      ⁡
                      
                        (
                        
                          
                          
                            D
                            j
                          
                          
                        
                        )
                      
                    
                    =
                    0
                  
                
              
            
          
        
      
    
    
      
        (
        2
        )
      
    
  




For a first-order difference, j=1 and D1={D21 . . . D561}. Equation (2) determines the minimum bit length sufficient to store the difference values.
The reference value bit length, the first-order difference value bit length, the reference value, and the set of first-order differences are stored 420 in a compressed data set 225 according to a pre-defined schema. In embodiments, since the maximum value for “health” only takes one bit, the first reference value bit length will be one bit. The calculated bit length B1 will be the first-order difference value bit length. In embodiments, if the first-order difference values are all 0, the computed bit length B1 will be 0 and thus the set of first-order difference values and the computed bit length will not be stored in the compressed data set 225.
2. A Second Embodiment of a Method for Compression of Data
FIG. 5 depicts a method 500 for compressing data 205 according to various embodiments of the invention. The method depicted in FIG. 5 may be used for data in which the values are small and distributed within a tight cluster. An exemplary set of 56 data values 205 is associated with the GPS parameter “uraidx” (See Table 1).
In embodiments, an original value is designated 505 as a first reference value. A set of first-order difference values is calculated 510 between neighboring original values according to Equation (1) as previously discussed.
A first-order difference value is designated 515 as a second reference value (e.g., D21), and a set of second-order differences is calculated 520 between neighboring first-order difference values according to the equation

Di2=Di1−Di−11, i=3, . . . , 56  (3)

In embodiments, the first reference value bit length is 8 bits because the maximum value of the parameter “uradix” is one byte. Alternatively, the bit length may be determined using Equation (2). The second reference value bit length is determined 530 according to equation (2), where j=1 as previously discussed.
A second-order difference value bit length is calculated 525 using Equation (2) where j=2 and D2={D32, D42, . . . , D562}.
The reference value bit lengths, the second-order difference value bit length, the reference values, and the set of second-order differences are stored 535 in a compressed data set 225 according to a pre-defined schema. In embodiments, if the second-order difference values are all 0, the computed bit length B2 will be 0 and thus the set of second-order difference values and the computed bit length will not be stored in the compressed data set 225.
3. A Third Embodiment of a Method for Compression of Data
FIG. 6 depicts a method 600 for compressing data 205 according to various embodiments of the invention. The method depicted in FIG. 6 may be used for data in which the values are distributed within straight line segments having different magnitudes. An exemplary set of 56 data values 205 is associated with the GPS parameter “omega0” (See Table 1).
In embodiments, an original value is designated 605 as a first reference value. A set of first-order difference values is calculated 610 between neighboring original values according to Equation (1) as previously discussed.
Since each line segment is almost straight, only one first-order difference value may be designated 615 as a second reference value D21, and a set of second-order differences is calculated 620 between neighboring first-order difference values according to Equation (3) as previously discussed.
In embodiments, a second-order value difference bit length is calculated 625 based on equation (2), as previously discussed. In various embodiments, an additional second-order value difference bit length is calculated based on a length optimization method such as method 700, which is further discussed in detail in a following section that references FIG. 7.
In embodiments, the first and second reference values are each assigned 630 the bit length designated for the parameter (e.g., the bit length associated with “omega0”). Alternatively, one or both of the reference values may have a bit length determined according to Equation (2).
The reference values bit length, at least one second-order difference value bit length, the reference values, and the set of second-order difference values are stored 635 in a compressed data set 225 according to a pre-defined schema.
a) Optimization by Calculating a Second Difference Value Bit Length
In embodiments of method 300, the magnitudes of the difference values within a set of difference values may be classified into groups. In various embodiments, the average magnitude of difference values within a first group is small relative to the average magnitude of difference values within a second group. In such cases, a determination of a single difference value bit length according to Equation (2) may not provide optimal compression efficiency when it is used to encode a set of difference values or a group of reference values. Therefore, in embodiments, one or more difference value bit lengths may be calculated for encoding the smaller magnitude differences. In embodiments using two bit lengths, an additional label bit is added to associate each encoded difference value with either the first or second difference value bit length.
FIG. 7 depicts a method 700 for determining at least one bit length for encoding a set of values according to various embodiments of the invention. FIG. 7 may be implemented as step 330 and/or 335 in embodiments of method 300.
A bit length B1 is calculated using Equation (2) to encode each value from a set S containing k values. A bit difference n and an increment value i are initialized 705, and a maximum space savings measure Mmax is initialized to 0 and its corresponding nmax is initialized to n. A second bit length B2 is defined 710 to be n bits shorter than B1. In embodiments, n is initialized to 7 and i is initialized to 1, meaning that B2 initially is defined to be 7 bits shorter than B1. In other embodiments in which the average value magnitudes are widely separated (such as in various embodiments of step 625 in method 600), n is initialized to 14 and i is initialized to 2. One skilled in the art will recognize that the choice of initialization values is not critical to the invention.
A subset Sm of S is created 715 that contains m values that are smaller than a value threshold 2^B2. A space-saving measure Mn is calculated 720 as nm−k for the saved space in using the smaller bit length B2 to encode the values in subset Sm. In embodiments, the space-saving measure accounts for a one bit label to be added to encode each value. If Mn>Mmax 725, Smax, is assigned the current value of Sm, Mmax is assigned the value of Mn, and nmax is assigned the current value of n 730.
If n>0 735, then the value of n is decremented by i 740, and steps 710 through 735 are repeated to calculate space savings and Mmax, using a larger second bit length B2.
If n<0 735, the value of Mmax, is evaluated 745. If Mmax>=0, then the values in subset Smax, are encoded 755 using the smaller bit length B1−nmax and the remaining values in set S are encoded using bit length B1 760. If Mmax<=0, then there is no space savings and the bit length B1 without using any added bit label is used 750 for all values in set S.
4. A Fourth Embodiment of a Method for Compression of Data
FIG. 8 depicts a method 800 for compressing data 205 according to various embodiments of the invention. The method depicted in FIG. 8 may be used for data in which the values are distributed within two interlaced straight lines having slightly different magnitudes. An exemplary set of 56 data values 205 is associated with each of the GPS parameters “af0,” “af1,” and “e” (See Table 1).
In embodiments, an original value is designated 805 as a first reference value. A set of first-order difference values is calculated 810 between neighboring original values according to Equation (1) as previously discussed.
Since in this example the data are interlaced, the second-order difference is calculated 820 between every two first-order differences according to the following equation:

Di2=Di1−Di−21, i=4, . . . , 56  (4)

and a second and third reference value, D21 and D31, are designated 815 from the set of first-order differences.
In embodiments, a second-order value difference bit length is designated 825 based on Equation (2), as previously discussed. In various embodiments, an additional second-order value difference bit length is calculated based on a length optimization method such as method 700.
In embodiments, the first reference value bit length may be designated as the bit length associated with a parameter such as “af0,” “af1,” and “e” or, alternatively, may be determined according to Equation (2). The bit length for the second and third reference values is determined 830 according to equation (2) where j=1 as previously discussed.
The reference values bit lengths, at least one second-order difference value bit length, the reference values, and the set of second-order difference values are stored 835 in a compressed data set 225 according to a pre-defined schema.
5. A Fifth Embodiment of a Method for Compression of Data
FIG. 9 depicts a method 900 for compressing data 205 according to various embodiments of the invention. The method depicted in FIG. 9 may be used for data in which the values are distributed within two interlaced straight lines having very different magnitudes. An exemplary set of 56 data values 205 is associated with the GPS parameter “m0” (See Table 1).
In embodiments, an original value is designated 905 as a first reference value. A set of first-order difference values is calculated 910 between neighboring original values according to Equation (1) as previously discussed.
The type of data distribution in this example may have a characteristic in which the signs of some of the values are flipped to the opposite signs. In embodiments, the flipped sign of an ith first-order difference value may be detected by selecting 915 a first-order difference value as a second reference value D21 and then comparing |Di1−D21| and |Di1+D21|. In embodiments, the detection of a flipped sign may be used to insure that magnitude of a second-order difference value is as small as possible for efficient compression. If |Di1−D21| is greater than |Di1+D21|, the sign of the ith first-order value is labeled as negative and its second-order difference is calculated as (Di1+D21). Otherwise, the sign of the ith first-order value is labeled as positive and its second-order difference is calculated as (|Di1−D21|) 920.
In embodiments, a set of third-order differences is calculated. Since in this example the data are interlaced, a third-order difference is calculated 930 between every two second-order differences according to Equation (4). A third and a fourth reference value, D32 and D42, are designated 925 from the set of second-order differences.
In embodiments, a set of fourth-order differences is calculated to further reduce the magnitude of the difference values for compression. A fourth-order difference is calculated 940 between every four third-order values according to the following equation:

Di4=Di3−Di−43, i=9, . . . , 56  (5)

In embodiments, a fifth, sixth, seventh, and eighth reference value D53 ̃D83 are designated 935 from the set of third-order differences.
In embodiments, a fourth-order value difference bit length is calculated 945 based on Equation (2), as previously discussed. In various embodiments, an additional fourth-order value difference bit length is determined based on a length optimization method such as method 700.
In embodiments, the first reference value bit length may be designated as the bit length associated with a parameter such as “m0” or, alternatively, may be determined according to Equation (2). The bit lengths for the second reference value, for the third and fourth reference values, and for the fifth, sixth, seventh, and eighth reference values are calculated 950 according to Equation (2) where j=1,2,3 as previously discussed. In embodiments, bit lengths except for the first and second reference value bit lengths include an extra bit to label sign-flipping.
The reference values bit lengths, at least one fourth-order difference value bit length, the reference values, and the set of fourth-order difference values are stored 955 in a compressed data set 225 according to a pre-defined schema.
6. A Sixth Embodiment of a Method for Compression of Data
FIG. 10 depicts a method 1000 for compressing data 205 according to various embodiments of the invention. The method depicted in FIG. 10 may be used for data in which the values are distributed within four interlaced sinoid curves having slightly different magnitudes. An exemplary set of 56 data values 205 is associated with each of the GPS parameters “asqrt,” “omega,” “crs,” “crc,” “cus,” “cuc,” “cis,” “cic,” “omegadot,” “deltan,” “idot,” and “i0” (See Table 1).
In embodiments, four original values are designated 1005 as a first, second, third, and fourth reference value. A set of first-order difference values is calculated 1010 between every four original values according to the following equation:

Di1=Di0−Di−40, i=5, . . . , 56  (6)

In embodiments, four first-order difference values are designated 1015 as a fifth, sixth, seventh, and eighth reference value. A set of second-order difference values is calculated 1020 between every four first-order difference values according to the following equation:

Di2=Di1−Di−41, i=9, . . . , 56  (7)

In embodiments, a second-order difference value is designated 1025 as the ninth reference value. A set of third-order differences is calculated 1030 between neighboring second-order difference values according to the following equation:

Di3=Di2−Di−12, i=10, . . . , 56  (8)

In embodiments, a third-order value difference bit length is determined 1035 based on Equation (2), as previously discussed. In various embodiments, an additional third-order value difference bit length is calculated based on a length optimization method such as method 700.
In embodiments, the bit length for the first, second, third, and fourth reference values may be designated as the bit length associated with a parameter such as “asqrt” or, alternatively, may be determined according to Equation (2). The bit lengths for the fifth, sixth, seventh, and eighth reference values, and for the ninth reference value are calculated 1040 according to equation (2) where j=1,2 as previously discussed.
The reference values bit lengths, at least one third-order difference value bit length, the reference values, and the set of third-order difference values are stored 1045 in a compressed data set 225 according to a pre-defined schema.
In embodiments, one or more multi-order differencing schemes may be nested within another scheme. For example, by way of explanation and not limitation, a multi-order differencing scheme may be used for the reference original values and/or the first order difference values of method 1000.
D. Methods for Decompressing Data Sets Compressed Using Multi-Order Differencing
FIG. 1 illustrates an exemplary GPS data package containing LTE data recorded at 56 timings over a two week period from 31 satellites. The LTE data 120 within the data package are ordered according to a schema based on timing (105, 110), as previously discussed. In embodiments of the present invention, the exemplary LTE data from each satellite may be compressed using a multi-order differencing scheme as implemented in embodiments of method 300 to produce 21 compressed data sets 225. A compressed GPS LTE data package thus would contain 31*21 compressed data sets 225.
In embodiments, the compressed data within a compressed data package may be ordered according to a schema for maximizing efficient use of resources on a client device during decompression. FIG. 11 illustrates an exemplary data ordering of compressed LTE data 120 within a compressed GPS LTE data package created from the exemplary GPS LTE data package illustrated in FIG. 1. The compressed LTE data 120 are ordered according to a schema based on satellite 115 rather than on timing (105, 110). If the compressed data had been stored according to the original schema, temporary information from earlier timings would have to be stored for use in decompressing data at later timings. By storing the compressed data according to a schema based on satellite, LTE data associated with a timing may be decoded without requiring storage of temporary information. The reduction of storage requirements reduces the memory consumption requirements and computational cost for decompression of data packages.
FIG. 12 depicts a method 1200 for generating uncompressed data 205 from compressed data 225 according to various embodiments of the invention. Method 1200 may be implemented in embodiments of system 200B.
In embodiments, the compressed data 225 may have been generated using a multi-order differencing scheme as implemented in embodiments of method 300. An exemplary compressed data set 225 may contain a bit length to encode each of the reference values, at least one bit length to encode a set of difference values, the reference values, and the set of difference values. The compressed data 225 may be ordered according to a pre-defined schema.
In embodiments, at least one bit length is extracted 1205 from the compressed data set 225. The extracted bit lengths may represent reference value bit lengths and difference value bit lengths, ordered as defined in the schema used to generate the compressed data set 225. Each reference value is extracted 1210 based on its corresponding extracted reference value bit length, and a set of difference values is extracted 1210 based on at least one extracted difference value bit length. In embodiments, the uncompressed data values 205 are recovered 1215 by using the extracted reference values and the extracted set of difference values in calculations determined by the type of multi-order differencing scheme used to compress the original values.
The following sections each describe embodiments of steps 1210 and 1215 in method 1200. For purposes of illustration and not limitation, each section is described in terms of the embodiment used to compress the data 205.
1. Decompression of Data Compressed According to Method 400
The data 205 that were compressed using an embodiment of method 400 may be recovered by extracting 1210 the reference value Di0, and the difference values, Di1, i=2, . . . , 56 from the compressed data set 225.
In embodiments, the 56 values in the original data set may be calculated according to the following equation:

Di0=Di1+Di−10, i=2, . . . , 56  (9)

2. Decompression of Data Compressed According to Method 500
The data 205 that were compressed using an embodiment of method 500 may be recovered by extracting 1210 the reference values, D10 and D21, and difference values Di2, i=3, . . . , 56 from the compressed data set 225.
In embodiments, the 56 original data values may be calculated according to the following set of equations:

Di1=Di2+Di−11, i=3, . . . , 56

Di0=Di1+Di−10, i=2, . . . , 56  (10)

3. Decompression of Data Compressed According to Method 600
The data 205 that were compressed using an embodiment of method 600 may be recovered by extracting 1210 the reference values, Di1 and D21 and difference values, Di2, i=3, . . . , 56 from the compressed data set 225.
In embodiments, the 56 original data values may be calculated according to the following set of equations:

Di1=Di2+Di−11, i=3, . . . , 56

Di0=Di1+Di−10, i=2, . . . , 56  (11)

4. Decompression of Data Compressed According to Method 800
The data 205 that were compressed using an embodiment of method 800 may be recovered by extracting 1210 the reference values, D10, D21, and D31 and the 53 difference values Di2, i=4, . . . , 56 from the compressed data set 225.
In embodiments, the 56 original data values may be calculated according to the following set of equations:

Di1=Di2+Di−11, i=4, . . . , 56

Di0=Di1+Di−10, i=2, . . . , 56  (12)

5. Decompression of Data Compressed According to Method 900
The data 205 that were compressed using an embodiment of method 900 may be recovered by extracting 1210 the reference values, the sign flipping labels, and the fourth-order difference values from the compressed data set 225.
In embodiments, the 56 original data values may be calculated according to the following set of equations:




  
    
      
        
          
            
              
                
                  D
                  i
                  3
                
                =
                
                ⁢
                
                  
                    D
                    i
                    4
                  
                  +
                  
                    D
                    
                      i
                      -
                      4
                    
                    3
                  
                
              
              ,
              
                
              
              ⁢
              
                i
                =
                9
              
              ,
              ...
              ⁢
              
                
              
              ,
              56
            
          
        
        
          
            
              
                
                  D
                  i
                  2
                
                =
                
                ⁢
                
                  
                    D
                    i
                    3
                  
                  +
                  
                    D
                    
                      i
                      -
                      2
                    
                    2
                  
                
              
              ,
              
                
              
              ⁢
              
                i
                =
                5
              
              ,
              ...
              ⁢
              
                
              
              ,
              56
            
          
        
        
          
            
              
                D
                i
                1
              
              =
              
              ⁢
              
                {
                
                  
                    
                      
                        
                          
                            
                              D
                              i
                              2
                            
                            -
                            
                              D
                              2
                              1
                            
                          
                          ,
                        
                      
                      
                        
                          negative
                          ⁢
                          
                            
                          
                          ⁢
                          label
                        
                      
                    
                    
                      
                        
                          
                            
                              D
                              i
                              2
                            
                            +
                            
                              D
                              2
                              1
                            
                          
                          ,
                        
                      
                      
                        
                          positive
                          ⁢
                          
                            
                          
                          ⁢
                          label
                        
                      
                    
                  
                  ,
                  
                    
                  
                  ⁢
                  
                    i
                    =
                    3
                  
                  ,
                  ...
                  ,
                  56
                
              
            
          
        
        
          
            
              
                
                  D
                  i
                  0
                
                =
                
                ⁢
                
                  
                    D
                    i
                    1
                  
                  +
                  
                    D
                    
                      i
                      -
                      1
                    
                    0
                  
                
              
              ,
              
                
              
              ⁢
              
                i
                =
                2
              
              ,
              ...
              ⁢
              
                
              
              ,
              56
            
          
        
      
    
    
      
        (
        13
        )
      
    
  




6. Decompression of Data Compressed According to Method 1000
The data 205 that were compressed using an embodiment of method 1000 may be recovered by extracting 1210 the reference values, D10 ̃D40, D51 ̃D81, and D92, and the 47 difference values Di3, i=10, . . . , 56 from the compressed data set 225.
In embodiments, the 56 original data values may be calculated according to the following set of equations:

Di2=Di3+Di−12, i=10, . . . , 56

Di1=Di2+Di−41, i=9, . . . , 56

Di0=Di1+Di−40, i=5, . . . , 56  (14)

E. Computing System Implementations
It shall be noted that the present invention may be implemented in any instruction-execution/computing device or system capable of processing data, including without limitation, a general-purpose computer and a specific computer, such as one intended for data processing. The present invention may also be implemented into other computing devices and systems. Furthermore, aspects of the present invention may be implemented in a wide variety of ways including software, hardware, firmware, or combinations thereof. For example, the functions to practice various aspects of the present invention may be performed by components that are implemented in a wide variety of ways including discrete logic components, one or more application specific integrated circuits (ASICs), and/or program-controlled processors. It shall be noted that the manner in which these items are implemented is not critical to the present invention.
FIG. 13 depicts a functional block diagram of an embodiment of an instruction-execution/computing device 1300 that may implement or embody embodiments of the present invention. As illustrated in FIG. 13, a processor 1302 executes software instructions and interacts with other system components. In an embodiment, processor 1302 may be a general purpose processor such as (by way of example and not limitation) an AMD processor, an INTEL processor, a SUN MICROSYSTEMS processor, or a POWERPC compatible-CPU, or the processor may be an application specific processor or processors. A storage device 1304, coupled to processor 1302, provides long-term storage of data and software programs. Storage device 1304 may be a hard disk drive and/or another device capable of storing data, such as a computer-readable media (e.g., diskettes, tapes, compact disk, DVD, and the like) drive or a solid-state memory device. Storage device 1304 may hold programs, instructions, and/or data for use with processor 1302. In an embodiment, programs or instructions stored on or loaded from storage device 1304 may be loaded into memory 1306 and executed by processor 1302. In an embodiment, storage device 1304 holds programs or instructions for implementing an operating system on processor 1302. In one embodiment, possible operating systems include, but are not limited to, UNIX, AIX, LINUX, Microsoft Windows, and the Apple MAC OS. In embodiments, the operating system executes on, and controls the operation of, the computing system 1300.
An addressable memory 1306, coupled to processor 1302, may be used to store data and software instructions to be executed by processor 1302. Memory 1306 may be, for example, firmware, read only memory (ROM), flash memory, non-volatile random access memory (NVRAM), random access memory (RAM), or any combination thereof. In one embodiment, memory 1306 stores a number of software objects, otherwise known as services, utilities, components, or modules. One skilled in the art will also recognize that storage 1304 and memory 1306 may be the same items and function in both capacities. In an embodiment, one or more of the components of FIGS. 2A and 2B may be modules stored in memory 1304, 1306 and executed by processor 1302.
In an embodiment, computing system 1300 provides the ability to communicate with other devices, other networks, or both. Computing system 1300 may include one or more network interfaces or adapters 1312, 1314 to communicatively couple computing system 1300 to other networks and devices. For example, computing system 1300 may include a network interface 1312, a communications port 1314, or both, each of which are communicatively coupled to processor 1302, and which may be used to couple computing system 1300 to other computer systems, networks, and devices.
In an embodiment, computing system 1300 may include one or more output devices 1308, coupled to processor 1302, to facilitate displaying graphics and text. Output devices 1308 may include, but are not limited to, a display, LCD screen, CRT monitor, printer, touch screen, or other device for displaying information. Computing system 1300 may also include a graphics adapter (not shown) to assist in displaying information or images on output device 1308.
One or more input devices 1310, coupled to processor 1302, may be used to facilitate user input. Input device 1310 may include, but are not limited to, a pointing device, such as a mouse, trackball, or touchpad, and may also include a keyboard or keypad to input data or instructions into computing system 1300.
In an embodiment, computing system 1300 may receive input, whether through communications port 1314, network interface 1312, stored data in memory 1304/1306, or through an input device 1310, from a scanner, copier, facsimile machine, or other computing device.
One skilled in the art will recognize no computing system is critical to the practice of the present invention. One skilled in the art will also recognize that a number of the elements described above may be physically and/or functionally separated into sub-modules or combined together.
It shall be noted that embodiments of the present invention may further relate to computer products with a computer-readable medium that have computer code thereon for performing various computer-implemented operations. The media and computer code may be those specially designed and constructed for the purposes of the present invention, or they may be of the kind known or available to those having skill in the relevant arts. Examples of computer-readable media include, but are not limited to: magnetic media such as hard disks, floppy disks, and magnetic tape; optical media such as CD-ROMs and holographic devices; magneto-optical media; and hardware devices that are specially configured to store or to store and execute program code, such as application specific integrated circuits (ASICs), programmable logic devices (PLDs), flash memory devices, and ROM and RAM devices. Examples of computer code include machine code, such as produced by a compiler, and files containing higher level code that are executed by a computer using an interpreter.
While the invention is susceptible to various modifications and alternative forms, specific examples thereof have been shown in the drawings and are herein described in detail. It should be understood, however, that the invention is not to be limited to the particular forms disclosed, but to the contrary, the invention is to cover all modifications, equivalents, and alternatives falling within the scope of the appended claims.

## Claims

1. A method for compressing data, the method comprising:
[a] designating the data as a working set of values;
[b] designating at least one reference value within the working set of values;
[c] generating a set of difference values using the working set of values;
[d] evaluating at least one condition based on at least one characteristic of the set of difference values;
[e] responsive to the at least one condition being satisfied, performing the steps comprising:
determining at least one reference value bit length to encode the at least one reference value;
determining at least one difference value bit length to encode at least some of the difference values within the set of difference values; and
storing a compressed data record according to a pre-defined schema, the compressed data record comprising the at least one reference value bit length, the at least one difference value bit length, the at least one reference value, and the set of difference values; and

[f] responsive to the at least one condition not being satisfied, designating the set of difference values as the working set of values and iterating by returning to step [b].

2. The method of claim 1 wherein the at least one characteristic is a variance and the at least one condition being satisfied is the variance being less than a threshold value.

3. The method of claim 1 wherein the step of determining at least one difference value bit length to encode at least some of the difference values within the set of difference values comprises dividing the set of difference values into subsets, each subset being associated with a corresponding bit length, and encoding each difference value using its associated bit length so that the compressed data record will be smaller than if one bit length were used to encode the set of difference values.

4. The method of claim 3 wherein the set of difference values is a first set of difference values and the step of determining the at least one difference value bit length comprises:
[a] designating a first difference value bit length to encode the first set of difference values;
[b] designating a second difference value bit length that is shorter than the first difference value bit length by an increment bit length;
[c] calculating a bit length threshold based on the second difference value bit length;
[d] responsive to at least one difference value within the first set of difference values being less than the bit length threshold, assigning the at least one difference value to a second set of difference values;
[e] calculating a space savings measure based on the size of the first set of difference values and the size of the second set of difference values;
[f] responsive to the space savings measure being greater than a maximum space savings measure, designating the space savings measure to be the maximum space savings measure and designating the second difference value bit length as an optimum bit length, and designating the second set of difference values as an associated second set of difference values;
[g] decrementing the increment bit length by a decrement value;
[h] responsive to the increment bit length being greater than zero, iterating by returning to step [b]; and
responsive to the maximum space savings measure being greater than zero, using the optimum difference value bit length to encode the difference values within the associated second set of difference values and using the first difference value bit length to encode the remaining difference values within the first set of difference values.

5. The method of claim 1 wherein the data is associated with a parameter.

6. The method of claim 5 wherein the step of designating the at least one reference value is based on the type of the parameter.

7. The method of claim 5 wherein the at least one difference between values is based on the type of the parameter.

8. The method of claim 5 wherein the data is GPS data and the parameter is within a set of ephemeris parameters.

9. The method of claim 8 wherein the compressed data record is stored according to the parameter.

10. A computer-readable medium having instructions for performing the method of claim 1.

11. A method for compressing data, the method comprising:
determining at least one reference value and a set of difference values;
determining at least one reference value bit length to encode the at least one reference value;
determining at least one difference value bit length to encode at least some of the difference values within the set of difference values; and
storing a compressed data record according to a pre-defined schema, the compressed data record comprising the at least one reference value bit length, the at least one difference value bit length, the at least one reference value, and the set of difference values.

12. The method of claim 11, wherein the step of determining the at least one reference value and the set of difference values comprises:
designating a first reference value from the data; and
calculating a first set of difference values using the data.

13. The method of claim 12 wherein:
the at least one reference value comprises the first reference value; and
the first set of difference values is the set of difference values.

14. The method of claim 12, wherein the step of determining the at least one reference value and the set of difference values further comprises:
designating a second reference value from the first set of difference values; and
calculating a second set of difference values using the first set of difference values.

15. The method of claim 14 wherein:
the at least one reference value comprises the first and the second reference values; and
the second set of difference values is the set of difference values.

16. The method of claim 12, wherein the step of determining the at least one reference value and the set of difference values further comprises:
designating a second reference value and a third reference value from the first set of difference values; and
calculating a second set of difference values comprising two subsets of difference values wherein one subset of difference values is associated with the second reference value and the other subset of difference values is associated with the third reference value.

17. The method of claim 16 wherein the values in the first set of difference values are associated with an order and one subset of difference values is obtained from a set of values comprising every other value in the first set of difference values and the other subset of difference values is obtained from the remaining, every other values in the first set of difference values.

18. The method of claim 16 wherein:
the at least one reference value comprises the first, the second, and the third reference values; and
the second set of difference values is the set of difference values.

19. The method of claim 14 wherein the step of calculating a second set of difference values using the first set of difference values comprises calculating a second set of difference values between the second reference value and the remaining values in the first set of difference values and the method further comprises:
designating a third reference value and a fourth reference value from the second set of difference values;
calculating a third set of difference values comprising two subsets of difference values wherein one subset of difference values is associated with the third reference value and the other subset of difference values is associated with the fourth reference value;
designating a fifth reference value, a sixth reference value, a seventh reference value, and an eighth reference value from the third set of difference values;
calculating a fourth set of difference values comprising four subsets of difference values wherein a first subset of difference values is associated with the fifth reference value, a second subset of difference values is associated with the sixth reference value, a third subset of difference values is associated with the seventh reference value, and a fourth subset of difference values is associated with the eighth reference value; and
wherein:
the at least one reference value comprises the first, the second, the third, the fourth, the fifth, the sixth, the seventh, and the eighth reference values; and
the fourth set of difference values is the set of difference values.

20. The method of claim 19 wherein calculating a second set of difference values between the second reference value and the remaining values in the first set of difference values comprises, for each difference value in the second set of difference values:
determining a first difference value using a value from the first set of differences and the second reference value;
determining a second difference value using the value from the first set of differences and the second reference value by inverting the sign of either the value from the first set of differences or the second reference value;
including in the second set of difference values the difference value from the first and the second difference values with the smaller absolute value; and
associating with the included difference value whether the sign of either the second reference value or the value from the first set of differences that generated the included difference value was inverted.

21. The method of claim 11, wherein the step of determining the at least one reference value and the set of difference values comprises:
designating a first reference value, a second reference value, a third reference value, and a fourth reference value from the data;
calculating a first set of difference values comprising four subsets of difference values wherein a first subset of difference values is associated with the first reference value, a second subset of difference values is associated with the second reference value, a third subset of difference values is associated with the third reference value, and a fourth subset of difference values is associated with the fourth reference value;
designating a fifth reference value, a sixth reference value, a seventh reference value, and a eighth reference value within the first set of difference values;
calculating a second set of difference values comprising four subsets of difference values wherein a fifth subset of difference values is associated with the fifth reference value, a sixth subset of difference values is associated with the sixth reference value, a seventh subset of difference values is associated with the seventh reference value, and an eighth subset of difference values is associated with the eighth reference value;
designating a ninth reference value from the second set of difference values;
calculating a third set of differences using the second set of difference values; and
wherein:
the at least one reference value comprises the first, the second, the third, the fourth, the fifth, the sixth, the seventh, the eighth, and the ninth reference values; and
the third set of difference values is the set of difference values.

22. The method of claim 11 wherein the step of determining the at least one reference value bit length comprises:
calculating whether fewer bits are required to encode at least one of the reference values if more than one reference value bit length is used; and
responsive to fewer bits being required to encode the at least one reference value, selecting a plurality of reference value bit lengths to encode the at least one reference value.

23. The method of claim 22 wherein the reference values are associated with an order.

24. The method of claim 11 wherein the step of determining the at least one difference value bit length comprises:
calculating whether fewer bits are required to encode the set of difference values if more than one difference value bit length is used; and
responsive to fewer bits being required to encode the set of difference values, selecting a plurality of difference value bit lengths to encode the set of difference values.

25. A computer-readable medium having instructions for performing the method of claim 11.

26. A method for compressing data, the method comprising:
associating a multi-order difference scheme with a parameter;
identifying a set of data values from the data that are associated with the parameter; and
using the multi-order difference scheme associated with the parameter to compress the set of data values;
wherein the set of data values from the data represents the 0-th order and the values comprising each subsequent order after the 0-th order are obtained from taking differences of values from the immediately prior order.

27. The method of claim 26 wherein a data file format is associated with the multi-order scheme.

28. The method of claim 26 wherein the set of values in at least one of the non 0-th orders in the multi-order scheme are obtained by:
determining a first difference value using a value from a set of values and a reference value, wherein the set of values and the reference value are obtained from the immediately prior order;
determining a second difference value using the value from the set of values and the reference value by inverting the sign of either the value from the set of differences or the reference value;
including in the set of values for an order the difference value from the first difference value and the second difference value, the difference value having a smaller absolute value; and
associating with the included difference value whether the sign of either the reference value or the value from the set of differences that generated the included difference value was inverted.

29. The method of claim 26 wherein the values in at least one of the orders in the multi-order scheme are obtained by:
identifying modes within the values of an immediately prior order; and
for each identified mode, selecting a reference value and calculating a set of differences using the reference values and the value associated with the identified mode.

30. The method of claim 26, wherein the data comprises data for a plurality of parameters and wherein at least some of the parameters have an associated multi-order scheme.

31. The method of claim 30 wherein the data is GPS data and the parameter is within a set of ephemeris parameters.

32. The method of claim 31 wherein the data comprises GPS data for a plurality of satellites, and the data are ordered by satellite.

33. A computer readable medium having instructions for performing the method of claim 26.

34. A method for compressing data, the method comprising:
associating a multi-order difference scheme with a parameter;
identifying a set of data values from the data that are associated with the parameter; and
using the multi-order difference scheme associated with the parameter to compress the set of data values;
wherein the multi-order difference scheme comprises:
for each order that is not the last order in the multi-order scheme, designating at least one reference value from the values in that order;
for the last order in the multi-order scheme, generating a set of difference values using values from the preceding order; and
storing the at least one reference value and the set of difference values according to a format associated with the multi-order difference scheme.

35. A method for compressing data, the method comprising:
associating a multi-order difference scheme with a parameter;
identifying a set of data values from the data that are associated with the parameter;
using the multi-order difference scheme associated with the parameter to compress the set of data values; and
for at least one of the orders, determining at least one bit length to encode at least some of the values at that order.

36. The method of claim 35 wherein a plurality of bit lengths are used to reduce the size of the compressed set of data values.

37. A method for decompressing a compressed data record comprising an ordered set of data values, the method comprising:
extracting at least one bit length from the compressed data record;
extracting at least one reference value and a set of difference values from the compressed data record based on the at least one bit length and the parameter; and
decompressing the compressed ordered set of data values based on the at least one reference value and the set of difference values.

38. The method of claim 37 wherein the ordered set of data values is associated with a parameter within a set of parameters.

39. The method of claim 38 wherein the set of parameters comprises GPS ephemeris data values associated with a satellite.

40. The method of claim 38 wherein the step of decompressing the compressed ordered set of data values comprises:
extracting a first reference value and a first set of difference values that are associated with a first parameter; and
calculating a first decompressed value by adding a first difference value from the first set of difference values to the first reference value.

41. The method of claim 40 wherein the first parameter has an associated decompression scheme.

42. The method of claim 41 wherein the decompression scheme is associated with a compression scheme.

43. A computer-readable medium having instructions for performing the method of claim 37.

44. A system for compressing a set of data values associated with a parameter, the system comprising:
a difference calculator, coupled to receive a working set of values, that generates a set of difference values comprised of at least one difference between values within the working set of values;
a bit length calculator, coupled to receive at least one reference value within the working set of values and the set of difference values, that determines at least one reference value bit length to encode the at least one reference value and at least one difference bit length to encode at least some of the set of difference values; and
a data record generator, coupled to receive the set of difference values, that performs an evaluation of at least one condition based on at least one characteristic of the set of difference values and generates a compressed data set in response to satisfaction of the at least one condition.

45. The system of claim 44 wherein the data record generator generates a compressed data set in response to satisfaction of the at least one condition by storing a compressed data record according to a pre-defined schema, the compressed data record comprising the at least one reference value bit length, the at least one difference value bit length, the at least one reference value, and the set of difference values.

46. The system of claim 44 wherein the difference calculator receives the set of difference values as the working set of values responsive to the at least one condition not being satisfied.

47. The system of claim 44 wherein the at least one condition being satisfied is a variance of the working set being less than a threshold value.

48. The system of claim 44 wherein the parameter is within a set of parameters comprising GPS ephemeris data values associated with a satellite.

49. A system for decompressing a compressed data record comprising an ordered set of data values associated with a parameter within a set of parameters, the system comprising:
a value extractor, coupled to receive the compressed data record, that extracts at least one reference value and a set of difference values from the compressed data record; and
a value calculator, coupled to receive the at least one reference value and the set of difference values, that calculates an uncompressed set of data values based on the at least one reference value and the set of difference values.

50. The system of claim 49 wherein calculating an uncompressed ordered set of data values is performed by the steps comprising:
extracting a first reference value and a first set of difference values that are associated with a first parameter; and
calculating a first decompressed value by adding a first difference value from the first set of difference values to the first reference value.

51. The system of claim 49 wherein the parameter is within a set of parameters comprising GPS ephemeris data values associated with a satellite.