A snippet is short, fulfills a particular task well, and doesn't require much extra code beyond the standard library or system dependent code. A snippet is not a complete program -- for that you can submit code to our source code repository, which is a better place for handle larger programs. Ideally, a snippet should be a section of code that you can snip out of a larger program and easily reuse in another program.
To make snippets easy to use, it's best to encapsulate them in a function, class, or, potentially, as a framework for starting a new program.While Codea set of symbols for representing something. For example, mostcomputers use ASCII codes to represent characters.Code is a way of communicating that is not understandable without additional information, how to decipher the code. In computing, code refers to the text used in programming to communicate with machines.
Tuesday, January 11, 2011
Lossy and Lossless Compression
Lossy Compression | Lossless Compression |
---|---|
Lossy compression •Lossy compression technologies attempt to eliminate redundant or unnecessary information. Most video compression technologies, such as MPEG, use a lossy technique. •Is a data encoding method which discards (loses) some of the data, in order to achieve its goal, with the result that decompressing the data yields content that is different from the original, though similar enough to be useful in some way. Lossy compression is most commonly used to compress multimedia data (audio, video, still images), especially in applications such as streaming media and internet telephony. Lossy compression formats suffer from generation loss: repeatedly compressing and decompressing the file will cause it to progressively lose quality. This is in contrast with lossless data compression. | Lossless compression •Is a class of data compression algorithms that allows the exact original data to be reconstructed from the compressed data. The term lossless is in contrast to lossy data compression, which only allows an approximation of the original data to be reconstructed, in exchange for better compression rates. •Most lossless compression programs do two things in sequence: the first step generates a statistical model for the input data, and the second step uses this model to map input data to bit sequences in such a way that "probable" data will produce shorter output than "improbable" data. Refers to data compression techniques in which no data is lost. |