1.3.1 Compression, Encryption and Hashing Flashcards
what is the purpose of compression?
- reduce file size
- reduce download times
- reduce storage requirements
- make best use of bandwidth
why is making the best use of bandwidth important?
- large amounts of data are streamed and sent over the internet so using bandwidth efficiently is critical
what is compression?
reduction of the overall size of a file
what are two methods of compression?
- lossy
- lossless
what needs to happen to a compressed file to read it?
it needs to be uncompressed
what is lossy compression?
reduction of file size by permanently deleting data/reducing the quality of the data
what is lossless compression?
reduction of the file size by storing the data in a different, more compressed way
this means the overall quality of the data does not change
which types of data cannot be compressed with lossy compression?
text documents
executable programs
what are two methods of lossless compression?
- dictionary coding
- run-length encoding
what is dictionary coding good for?
text-based documents
what is run-length encoding more suited for?
images
how does dictionary coding work?
- builds an index
- every data item or entry in the file is recorded, along with an indexed reference or unique code
- file consists of dictionary index + sequence of occurrences needed to recreate original file
how does run-length encoding work?
- if there are lots of contiguous pixels of the same colour, the number of pixels of that colour can be stored rather than storing them individually
- it is stored in frequency/data pairs
what is encryption?
the process of encoding a message so that it can be read only by the sender and the intended recipient
how does symmetric encryption work?
- a single key is used to both encrypt and decrypt a message
- both parties need to know the key and keep it secret