# all files / lib/spdy-transport/protocol/http2/ hpack-pool.js

100% Statements 12/12
100% Branches 0/0
75% Functions 3/4
100% Lines 12/12

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35

    1×

    1×

    1×

    1×

    1×
    199×

    1×
    199×

    199×
    199×

    199×

    1×

     'use strict'

    var constants = require('./').constants

    var hpack = require('hpack.js')

    function Pool () {
    }
    module.exports = Pool

    Pool.create = function create () {
      return new Pool()
    }

    Pool.prototype.get = function get (version) {
      var options = {
        table: {
          maxSize: constants.HEADER_TABLE_SIZE
        }
      }

      var compress = hpack.compressor.create(options)
      var decompress = hpack.decompressor.create(options)

      return {
        version: version,

        compress: compress,
        decompress: decompress
      }
    }

    Pool.prototype.put = function put () {
    }