Avoid excessive mutex locking when processing a slice with mixed
reference IDs. If the record level reference ID doesn't change from
one record to the next, don't attempt to query the new reference.


git-svn-id: svn://svn.code.sf.net/p/staden/code/io_lib@3768 ba6f2710-ca9f-427c-89d3-5bf716dbc8e1
Removed the spurious warning about lack of EOF when running on a CRAM
v2.0 or v1.0 file as the EOF blocks were not generated back then.


git-svn-id: svn://svn.code.sf.net/p/staden/code/io_lib@3769 ba6f2710-ca9f-427c-89d3-5bf716dbc8e1
Added in the compressed length field to the rANS codec header.

Technically this isn't needed, but it adds a very small extra amount
of space and it allows for the internal rANS codec to be the same
format as an external block-based rANS codec, or to allow the rANS
codec internally to compress very large buffers using a smaller block
size.

This now brings this code into line with the Java cramtools


git-svn-id: svn://svn.code.sf.net/p/staden/code/io_lib@3770 ba6f2710-ca9f-427c-89d3-5bf716dbc8e1
Fixed SAM parsing code to handle integer values from -2billion to
+4billion, for proper BAM generation.

Fixed BAM to SAM conversion to correctly track whether the bam aux
item is signed or unsigned.  To do this the old bam_aux_iter has been
updated to become bam_aux_iter_full (the old one being a wrapper
around the new).  The full version also now returns the original bam
format code instead of the generic sam 'i' code for all integers.


git-svn-id: svn://svn.code.sf.net/p/staden/code/io_lib@3771 ba6f2710-ca9f-427c-89d3-5bf716dbc8e1