1.3.1 Compression, Encryption and Hashing Flashcards
1.3.1 A)
Why should you use compression
-reduces file size
-reduces download time
-reduce storage requirments
- best use of bandwidth
1.3.1 A)
How does compression work
reduces overall file size of a file as much as possible when it is reviced file needs to be uncompressed.
1.3.1 A)
What are the two types of compression
lossy & lossless
1.3.1 A)
How does lossy compression work
reduces file size while removing some of its infomation could result in more pixelated images or less clear audio
1.3.1 A)
How does lossless compression work
reduce file size of file without losing info orginal can be revcover.
1.3.1 B)
What is run length encoding
method of lossless compression. repeated values are removed and replaced with one value. May not be reduced by a big number if no repeats
AAABBC = 3A2B1C
1.3.1 B)
What is dictionary encoding
Lossless compression stored alongside a dictonary example in notes.
index frequently occuring notes.
rewrite with index
1.3.1 C)
What is encryption
Used to keep data secure. scrambles data before its send and then dispher once arrive.
1.3.1 C)
What are the two types of encryption
Symmetric & Asymmetric
1.3.1 C)
What is symmetric encryption
sender and reciever share the same priv key. Key is used for encryption and decryption
important private key is kept secret. if key is intercepted during key exhange communication can be intercepted and decryption
1.3.1 C)
What is asymmetric encryption
Solves this problem of interception.
Uses two keys one priv and one public. Public key can be used/published anywhere
Two keys are key pairs they are mathematically related
A single key cannot be used to both encryption and decryption. recipent has the private key
Digital signitrues send a msg w private key.
1.3.1 D)
What is hashing
Process in which an input(a key) is turned into a fixed size value (a hash) the algorthmn that does that is called hasing algroithm.
output of hashing function cannot be revered to form the key, makes it good for storing passwords.
1.3.1 D)
What is another use for hashing
Hash table is a data structure which holds key-value. used to look up data in an array in constant time, for example cache and data base.
Two keys can produce the same hash which can cause collion.
To overcome collison store items together in a list under hash value or use a second hash function to make a new hash
A good hash function should have low collision chance and should produce an output which is smaller than the input it was provided otherwise it would be quicker to simple serch for the key.
1.3.1 C
Two characteristic you want from a hashing algorithm
Low Collision rate
Provides a smaller output than input
(This is the last point of flash card 13 but I want to make it clearer)