zstream.js 851 B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. function ZStream() {
  3. /* next input byte */
  4. this.input = null; // JS specific, because we have no pointers
  5. this.next_in = 0;
  6. /* number of bytes available at input */
  7. this.avail_in = 0;
  8. /* total number of input bytes read so far */
  9. this.total_in = 0;
  10. /* next output byte should be put there */
  11. this.output = null; // JS specific, because we have no pointers
  12. this.next_out = 0;
  13. /* remaining free space at output */
  14. this.avail_out = 0;
  15. /* total number of bytes output so far */
  16. this.total_out = 0;
  17. /* last error message, NULL if no error */
  18. this.msg = ''/*Z_NULL*/;
  19. /* not visible by applications */
  20. this.state = null;
  21. /* best guess about the data type: binary or text */
  22. this.data_type = 2/*Z_UNKNOWN*/;
  23. /* adler32 value of the uncompressed data */
  24. this.adler = 0;
  25. }
  26. module.exports = ZStream;