of the pattern instead of the original data. Common raster compression algorithms include run-length encoding (RLE), JPEG, LZ (the basis for PNG and ZIP), LZW (the basis for GIF), and others. For example, Run length encoding looks for repeated values in the array, and replaces them with the value and the number of times it appears. Thus, the raster above would be represented as: This technique is very efficient when there are large areas of identical values, such as a line drawing, but in a photograph where pixels are usually slightly different from their neighbors, the RLE file would be up to twice the size of the original. Some compression algorithms, such as RLE and LZW, are lossless, where the original pixel values can be perfectly regenerated from the compressed data. Other algorithms, such as JPEG, are lossy, because the parameterized patterns are only an approximation of the original pixel values, so the latter can only be estimated from the compressed data. Raster–vector conversion Vector images (line work) can be rasterized (converted into pixels), and raster images vectorized (raster images converted into vector graphics), by software. In both cases some information is lost, although certain vectorization operations can recreate salient information, as in the case of optical character recognition. Displays Early mechanical televisions developed in the 1920s employed rasterization principles. Electronic television based on cathode-ray tube displays are raster scanned with horizontal rasters painted left to right, and the raster lines painted top to bottom. Modern flat-panel displays such as LED monitors still use a raster approach. Each on-screen pixel directly corresponds to a small number of bits in memory. The screen is refreshed simply by scanning through pixels and coloring them according to each set of bits. The refresh procedure, being speed critical, is often implemented by dedicated circuitry, often as a part of a graphics processing unit. Using this approach, the computer contains an area of memory that holds all the data that are to be displayed. The central processor writes data into this region of memory and the video controller collects them from there. The bits of data stored in this block of memory are related to the eventual pattern of pixels that will be used to construct an image on the display. An early scanned display with raster computer graphics was invented in the late 1960s by A. Michael Noll at Bell Labs, but its patent