I don't think huffman is going to get me where I need to be, because the two samples I want to include are around 6K and 15K in size after being converted to 8 bits at 8000hz.

I was looking at the sound data though, and it sure looks like one should be able to get better than 4:1 compression without much difficulty. I mean in general, it looks like one could linearly interpolate over four or more samples on average and still have a pretty accurate reproduction of the waveform. Also, it occured to me that instead of interpolating linearly, one could interpolate using cosine, and get a more accurate reproduction, and if there are artifacts, they'd probably be easier on the ears. And I've already got a sine table in my code.

I'm counting the samples right now in areas of quiet and speech, and it seems like there's between 4 and 8 samples over which a half cosine, scaled properly, would be a good match. You'd need one byte to define the start point, and another to define the endpoint, but the endpoint of one would be the startpoint of another, so those count as just one byte per cosine. Then you'd need the number of samples over which to interpolate. You could use another byte for that, but a nibble should be sufficient. Also, we need a way to choose which half of the cosine to use. You could use a bit for that, but I think that just using the sign of the difference between the start position of this half cosine and the next will give the result we're looking for.

The only thing remaining is how to decide is how many samples we can interpolate for each half cosine before switching to the next. That, I'm not too sure about. I guess you could try both upslope and downslope half-cosines and different sample lengths, and have some kind of error metric and if you exceed that that's where you switch to the next one. Though something tells me there's gotta be a better way.

Anyway, let's say it's two bytes per half-cosine, and each covers 4-8 bytes. That's an average of 6 bytes coverage for 2 bytes, so that would be a 1:3 compression ratio. Not bad. And you could increase it if you only stored a nybble for the number of samples in each half-cosine.