lib/gridfs-stream/download.js
function GridFSBucketReadStream(chunks, files, readPreference, filter, options) {
  this.s = {
    bytesRead: 0,
    chunks: chunks,
    cursor: null,
    expected: 0,
    files: files,
    filter: filter,
    init: false,
    expectedEnd: 0,
    file: null,
    options: options,
    readPreference: readPreference
  };

  stream.Readable.call(this);
}
function GridFSBucketReadStream(chunks, files, readPreference, filter, options) {
  this.s = {
    bytesRead: 0,
    chunks: chunks,
    cursor: null,
    expected: 0,
    files: files,
    filter: filter,
    init: false,
    expectedEnd: 0,
    file: null,
    options: options,
    readPreference: readPreference
  };

  stream.Readable.call(this);
}
function GridFSBucketReadStream ( chunks , files , readPreference , filter , options ) { this . s = { bytesRead : 0 , chunks : chunks , cursor : null , expected : 0 , files : files , filter : filter , init : false , expectedEnd : 0 , file : null , options : options , readPreference : readPreference } ; stream . Readable . call ( this ) ; }
A readable stream that enables you to read buffers from GridFS.

Do not instantiate this class directly. Use `openDownloadStream()` instead.

@class
@param {Collection} chunks Handle for chunks collection
@param {Collection} files Handle for files collection
@param {Object} readPreference The read preference to use
@param {Object} filter The query to use to find the file document
@param {Object} [options] Optional settings.
@param {Number} [options.sort] Optional sort for the file find query
@param {Number} [options.skip] Optional skip for the file find query
@param {Number} [options.start] Optional 0-based offset in bytes to start streaming from
@param {Number} [options.end] Optional 0-based offset in bytes to stop streaming before
@fires GridFSBucketReadStream#error
@fires GridFSBucketReadStream#file
@return {GridFSBucketReadStream} a GridFSBucketReadStream instance.
A readable stream that enables you to read buffers from GridFS .