Science Fair Projects Ideas - Delta encoding

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Delta encoding

Delta encoding is a way of storing data in form of differences (deltas) between sequential data rather than data themselves. It is sometimes called delta compression because some instances of the encoding can make encoded data shorter than non-encoded data.

Perhaps the simplest example is storing values of bytes as differences (deltas) between sequential values, rather than the values themselves. So, instead of 2, 4, 6, 9, 7, we would store 2, 2, 2, 3, -2. This is not very useful when used alone, but it can help further compression of data in which sequential values occur often. IFF 8SVX sound format applies this encoding to raw sound data before applying compression to it. Unfortunately, not even all 8-bit sound samples compress better when delta encoded, and the usability of delta encoding is even smaller for 16-bit and better samples. Therefore, compression algorithms often choose to delta encode only when the compression is better than without. However, in video compression delta frames can considerably reduce frame size, and is used in virtually every video compression codec.

A variation of delta encoding which encodes differences between the prefixes or suffixes of strings is called incremental encoding. It is particularly effective for sorted lists with small differences between strings, such as a list of words from a dictionary.

The nature of the data to be encoded influences the effectiveness of a particular compression algorithm. Delta encoding performs best when data has small or constant variation; for an unsorted data set, there may be little to no compression possible with this method.

The following C code performs delta encoding and decoding:

void delta_encode(char *buffer, int length)
{
  char t = 0;
  char original;
  int i;
  for(i = 0; i < length; i++)
  {
    original = buffer[i];
    buffer[i] -= t;
    t = original;
  }
}
void delta_decode(char *buffer, int length)
{
  char t = 0;
  int i;
  for(i = 0; i < length; i++)
  {
    buffer[i] += t;
    t = buffer[i];
  }
}

Another instance of use of delta encoding is RFC 3229, "Delta encoding in HTTP," which proposes that HTTP should be able to send updated Web pages in form of differences between versions (deltas), which should decrease Internet traffic, as most pages change slowly over time, rather than being completely overwritten repeatedly:

This document describes how delta encoding can be supported as a compatible extension to HTTP/1.1.
Many HTTP (Hypertext Transport Protocol) requests cause the retrieval of slightly modified instances of resources for which the client already has a cache entry. Research has shown that such modifying updates are frequent, and that the modifications are typically much smaller than the actual entity. In such cases, HTTP would make more efficient use of network bandwidth if it could transfer a minimal description of the changes, rather than the entire new instance of the resource. This is called "delta encoding."

See also

External links

  • RFC 3229 - Delta Encoding in HTTP
  • RFC 3284 - The VCDIFF Generic Differencing and Compression Data Format
10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice