Could we make this an Either[ByteBuffer, Iterator[Any]]?