So it's been a couple days. Not a daily habit yet. Seems like a good thing to
do though, so I'll do my best to stick with it.
What have I done since the last post.
I've started worked on the Zip project. I will admit though that I haven't been
on top of the C++ reading. Just moved to a new place so I've been a little
caught up in that. The zip project though is going decently so far. I've
implemented the basic huffman compression algorithm.
I created my own special magic number that of course spells out my initials,
IDJL. After that, I store the size of the uncompressed file as an 8 byte value. Then comes the compressed tree. 0 represents a parent node and 1 represents a leaf node (after a 1, I then store the character at that leaf in a byte). An important note that I had to think about so that I could understand how this compression was valid is that a parent node is guaranteed to have two children (i.e. the tree is 'full'; a node has either 0 or 2 children).
Then comes the compressed data. I struggled with figuring out how to output
bit by bit in C++. I then came to the conclusion that you simply format it byte by byte and forfeit adding a couple extra bits at the end (max 7 extra bits).
This is possibly one of the reasons to have the uncompressed file size. Either way, that's what I'll be using it for.
And that's it so far. Next step will just be to hook it up to the display
service so that the executable displays statuses as the file is compressed.
Of course after that it will be decompression. I was also thinking about
implementing arithmetic coding. I've seen that around and it's piqued my
curiousity. We'll have to see though. I'm trying to get back on the Andrew Ng
ML course that I started a while back. Goal is to have at least the first week
reviewed by this weekend. I'll try to continue reading the Effective Modern C++ book on the side if I have time; it will be useful eventually.
I am flitting back and forth between projects. Hopefully I can relax that habit this term and just get the main goals done (Zip project
and ML course). We'll see what I can do. That's all for now.
Oh wait yeah how could I forget. Had my first day at Ritual today. Very
interesting place. Very different than Shopify in many ways, including
development. Definitely less hand-holding on the first day which I found quite refreshing. Maybe that will come during orientation next week. Either way, I think there is some serious potential here to have some real impact.