ericaddison / Algs_Term_Project

Term project for the UT Austin ECE course "Algorithmic Foundation for Software Systems"
0 stars 0 forks source link

Bytebuffer #14

Closed ericaddison closed 7 years ago

ericaddison commented 7 years ago

Hey guys,

Here are a few changes to start using a Java ByteBuffer, which will allow us to just pass around a collection of bytes after a certain point. The canges include:

I think with this change, we will be able to implement the Huffman encoder with absolutely NO assumptions about the incoming data, just that it is a bunch of bytes. You could implement the HuffmanStep class to just be a very thin wrapper around the code you have for Huffman, and just send in the byte[] array you get from the ByteBuffer, or something like that.

There is a test class called AudioByteBufferImpl that you can use, Taylor, for testing out your encoder. It just holds a given number of random ints. There is a block of code in the AudioByteBufferDemo class that shows how to instantiate and use it.

Let me know if this looks OK and I'll merge it in. Thanks!

JoshMusick commented 7 years ago

Looks fine to me.