YSC2229: Introductory Data Structures and Algorithms
  • 1. Course Syllabus
  • 2. Software Prerequisites
  • 3. OCaml Style Guide
  • 1. Week 01: Introduction
  • 2. Week 02: Working with Arrays
  • 3. Week 03: Complexity of Algorithms and Order Notation
  • 4. Week 04: Divide-and-Conquer Algorithms
  • 5. Week 05: Binary Heaps and Priority Queues
  • 6. Week 06: Abstract Data Types
  • 7. Midterm Project: Memory Allocation and Reclamation
  • 8. Week 07: Hashing-Based Data Structures
  • 9. Week 08: Searching in Strings
  • 10. Week 09: Backtracking and Dynamic Programming
  • 11. Week 10: Data Encoding and Compression
    • 11.1. File Input and Output in OCaml
    • 11.2. Binary Encoding of Data
    • 11.3. Run-Length Encoding
    • 11.4. Huffman Encoding
    • 11.5. Installing GraphViz
  • 12. Week 11: Binary Search Trees
  • 13. Week 12: Graph Algorithms
  • 14. Week 13: Elements of Computational Geometry
  • 15. Final Project: Vroomba Programming
YSC2229: Introductory Data Structures and Algorithms
  • Docs »
  • 11. Week 10: Data Encoding and Compression

11. Week 10: Data Encoding and CompressionΒΆ

  • 11.1. File Input and Output in OCaml
    • 11.1.1. Reading and Writing with Channels
    • 11.1.2. Copying Files
    • 11.1.3. Representing Strings
  • 11.2. Binary Encoding of Data
    • 11.2.1. Writing and Reading Binary Files
    • 11.2.2. Writing and Reading OCaml Strings
    • 11.2.3. Compressing DNA Sequences
  • 11.3. Run-Length Encoding
    • 11.3.1. Design Considerations
    • 11.3.2. Implementation
  • 11.4. Huffman Encoding
    • 11.4.1. Assigning Codes via Character Trees
    • 11.4.2. Serializing Huffman Trees
    • 11.4.3. Constructing Huffman tree from Frequencies
    • 11.4.4. Computing Relative Frequencies
    • 11.4.5. Encoding and Writing the Compressed Text
    • 11.4.6. Decompression
    • 11.4.7. Testing and Running Huffman Compression
  • 11.5. Installing GraphViz
    • 11.5.1. Microsoft Windows 10
    • 11.5.2. Linux
    • 11.5.3. Mac OS X
Next Previous

© Copyright 2021, Ilya Sergey

Built with Sphinx using a theme provided by Read the Docs.