CSE 15 Lecture Notes - Lecture 14: Polish Notation, Reverse Polish Notation, Linked List
Document Summary
Assignment4 files: bv. h, code. h, decode. c, encode. c, huffman. c, huffman. h, priority. c, queue. h, stack. c, stack. h. On assignment3 and how to use git: definition of insanity: turning in assignments late and not pushing code to git continuously, start the next assignment early, git: version control system checkpoint your work, think through code. Multiple symbols in one byte: stacks, priority queue 256 leaves, you can add/remove 255 leaves, okay to use simple implementation because of the scale we"re implementing it at. If you have imbalanced trees, it can be 255 trees, if you give it big binary file: might want to make a buffer, you have the tools (above). Encode: main function, getopt, then open input if (inputfile) if(outputfile), struct state filestat: fstat(filein, &filestat), look at file, see how big it is, can"t write bits, can only write bytes, last byte has bits you haven"t encoded yet. Limitation of huffman/encoding/decoding: if file is statistically random, huffman trees won"t help: or something that is already encoded.