  The barcode of a persistence module serves as a complete combinatorial
invariant of its isomorphism class. Barcodes are typically extracted by
performing changes of basis on a persistence module until the constituent
matrices have a special form. Here we describe a new algorithm for computing
barcodes which also keeps track of, and outputs, such a change of basis. Our
main result is an explicit characterisation of the group of transformations
that sends one barcode basis to another. Armed with knowledge of the entire
space of barcode bases, we are able to show that any map of persistence modules
can be represented via a partial matching between bars provided that neither
source nor target admits nested bars in its barcode. We also generalise the
algorithm and results described above to work for zizag modules.
