xan: Use bytestream2 to limit reading to within the buffer