code: function(b, lenBytes) {
    var len = 0;
    switch(lenBytes) {
    case 1:
      len = b.getByte();
      break;
    case 2:
      len = b.getInt16();
      break;
    case 3:
      len = b.getInt24();
      break;
    case 4:
      len = b.getInt32();
      break;
    }
  
    // read vector bytes into a new buffer
    return forge.util.createBuffer(b.getBytes(len));
  }
docs: Reads a TLS variable-length vector from a byte buffer.
  
  Variable-length vectors are defined by specifying a subrange of legal
  lengths, inclusively, using the notation <floor..ceiling>. When these are
  encoded, the actual length precedes the vector's contents in the byte
  stream. The length will be in the form of a number consuming as many bytes
  as required to hold the vector's specified maximum (ceiling) length. A
  variable-length vector with an actual length field of zero is referred to
  as an empty vector.
  
  @param b the byte buffer.
  @param lenBytes the number of bytes required to store the length.
  
  @return the resulting byte buffer.