code: int unpack_info(Buffer opb) {
          version = opb.read(32);
          if (version != 0) {
              return (-1);
          }
  
          channels = opb.read(8);
          rate = opb.read(32);
  
          bitrate_upper = opb.read(32);
          bitrate_nominal = opb.read(32);
          bitrate_lower = opb.read(32);
  
          blocksizes[0] = 1 << opb.read(4);
          blocksizes[1] = 1 << opb.read(4);
  
          if ((rate < 1) || (channels < 1) || (blocksizes[0] < 8) || (blocksizes[1] < blocksizes[0])
                  || (opb.read(1) != 1)) {
              clear();
              return (-1);
          }
          return (0);
      }
docs: Header packing/unpacking