This isn't ready to go yet, but I want to share how far I got.
Good:
Can append single values of float32 and float64 and slices of uint16.
Can refresh the header.
Tests check the above functionality.
Todo:
Test uint16 values are correct.
Write speed optimizations.
Use getbytes (I have a draft in Append2)
Have a write buffer of some sort. (You could probably use a buffered writer on the file for appending, and just seek back and forth without the buffered writer's knowledge, or just implement our own buffered write function.)
Have a way to write a whole pulse record into multiple files of this format.
Bad/learning:
I tried tried to use arrays so that you couldn't pass the wrong length, but that didn't work well. It would probably be annoying in practice in go as well.
I used generic types, but this may have been a bad idea because Go doesn't have many tools for them.
OMG I can't believe how much verbose error handling boiler plate there is in go.
This isn't ready to go yet, but I want to share how far I got.
Good:
Todo:
Bad/learning: