dstructures Flashcards
js: a blob is
the binary string of an entire file stored in ram. Like a file stored fully in ram.
cs: a binary is
a string sequence of 0s or 1s that make up any file
cs: a bit is
a string, either 0 or 1
cs: a byte is
a string of 8 bits (which are either 0 or 1)
cs: All digital media (text, pictures, videos, etc) is
stored as bits at the lowest level
cs: bit stands for
binary digit
https://medium.freecodecamp.org/do-you-want-a-better-understanding-of-buffer-in-node-js-check-this-out-2e29de2968e8
cs: To save a number, a computer must first
convert it to its binary representation whic is the same number written in base-2. So, 3 becomes 11.
cs: To save a letter, a computer must first
convert it to a number (using the character to number dictionary called character set, usually unicode), and then convert that number into binary aka base-2.
cs: To know which letter corresponds with which number, a computer must check the
character to number dictionary, aka, character set, usually unicode
cs: The most common character set is
Unicode
cs: A character set is
a character to number dictionary
cs: A character encoding is a
set of rules about how to format the binary you created from a letter
cs: The most popular character encoding it
UTF-8
cs: The UTF-8 rules about converting a character to a byte force you to
save into a bytes (8 digits). When the letter’s number’s base-2 version is less than 8 digits, you must add 0s to the beginning of the byte.
cs: Chunks are kinda big
a large text file can have just 2 chunks.
js: During a stream, node automatically creates
an internal buffer
cs: The three types of stream are
readable, writable and duplex
cs: Some common uses of streams are
reading and writing to disk, sending response to client from server, console.log()