finished buffer-related functions
checksums can now be written using ub_write_block
added ub_write_comment_block