EmbLogic's Blog

Data Compression

Compression

Data compression is often referred to as coding, where coding is a very general term encompassing any special representation of data which satisfies a given need.

A simple characterization of data compression is that it involves transforming a string of characters in some representation (such as ASCII) into a new string (of bits, for example) which contains the same information but whose length is as small as possible. Data compression has important application in the areas of data transmission and data storage. Many data processing applications require storage of large volumes of data, and the number of such applications is constantly increasing as the use of computers extends to new disciplines.

2 Responses to Data Compression

  1. amit.verma says:

    i am able to fetch data from a file and save it in an array ,
    now i am stuck up in the part where i have to fetch each char in such a manner that it occurs only once.

  2. himanshu says:

    string: she sells sea shells…
    Two loops, inner and outer.
    outer loop: assign a variable with 1st character and increment
    inner loop: check if variable = next character of string.if yes then next iteration(continue) if no then read the char in a buffer.
    note:characters may be read again and again for which buffer is also needed to be compared every time inner loop finishes.For that buffer index must be made zero when in outer loop.

Leave a Reply to himanshu Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>