code: function extractBlobData (blob) {
    // todo: add tests for non-zlib cases
    switch (true) {
      // error cases:
  
      // * lzma compressed data (support for this kind of data is not required by the specs)
      case blob.lzma_data !== null:
        throw new Error('unsupported osmpbf blob data type: lzma_data')
      // * formerly used for bzip2 compressed data, deprecated since 2010
      case blob.OBSOLETE_bzip2_data !== null:
        throw new Error('unsupported osmpbf blob data type: OBSOLETE_bzip2_data')
      // * empty data blob??
      default:
        throw new Error('unsupported osmpbf blob data type: <empty blob>')
  
      // supported data formats:
  
      // * uncompressed data
      case blob.raw !== null:
        return blob.raw
      // * zlib "deflate" compressed data
      case blob.zlib_data !== null:
        var blobData = new Buffer(blob.raw_size)
        inflate(blob.zlib_data.slice(2), blobData)
        return blobData
    }
  }
docs: helper function that extracts / decompresses a data blob