function Reader(buffer) {

    /**
     * Read buffer.
     * @type {Uint8Array}
     */
    this.buf = buffer;

    /**
     * Read buffer position.
     * @type {number}
     */
    this.pos = 0;

    /**
     * Read buffer length.
     * @type {number}
     */
    this.len = buffer.length;
}
Constructs a new reader instance using the specified buffer.
@classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.
@constructor
@param {Uint8Array} buffer Buffer to read from