Abstract
Compression is one of the tools that every programmer should understand and wield confidently. Such situations when the size of the dataset is larger than the program can handle directly and it becomes a bottleneck are quite frequent and can be encountered in any domain. There are many forms of compression, yet the most general subdivision is between lossless one which preserves the original information intact and lossy compression which discards some information (assumed to be the most useless part or just noise). Lossless compression is applied to numeric or text data, whole files, or directories—the data that will become partially or utterly useless if even a slight modification is made. Lossy compression, as a rule, is applied to data that originates in the "analog world": sound or video recordings, images, and so on. We have touched the subject of lossy compression slightly in the previous chapter when talking about such formats as JPEG. In this chapter, we will discuss the lossless variants in more detail. Besides, we'll talk a bit about other, non-compressing forms of encoding.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
To make full use of this feature and be able to profile SBCL internal functions, you’ll need to compile SBCL with the --with-cons-profiling flag. Many thanks to Douglas Katzman for developing this feature and guiding me through its usage.
- 2.
It was verified by taking the average of multiple test runs.
- 3.
You can study the details in the relevant article.
- 4.
Some implementations (for instance, SBCL) have “smart enough” compilers to perform constant folding of such expressions. However, read-eval may be used to help the compiler if it is not smart enough.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2021 Vsevolod Domkin
About this chapter
Cite this chapter
Domkin, V. (2021). Compression. In: Programming Algorithms in Lisp. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-6428-7_14
Download citation
DOI: https://doi.org/10.1007/978-1-4842-6428-7_14
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-6427-0
Online ISBN: 978-1-4842-6428-7
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)