A video codec is a device or software that enables compression or decompression of digital video; the format of the compressed data adheres to a video compression specification. The compression is usually lossy. Historically, video was stored as an analog signal on magnetic tape. Around the time when the compact disc entered the market as a digital-format replacement for analog audio, it became feasible to also begin storing and using video in digital form, and a variety of such technologies began to emerge. Audio and video call for customized methods of compression. Engineers and mathematicians have tried a number of solutions for tackling this problem. There is a complex relationship between the video quality, the quantity of the data needed to represent it (also known as the bit rate), the complexity of the encoding and decoding algorithms, robustness to data losses and errors, ease of editing, random access, and end-to-end delay.