code: func (reader *DataFileReader) NextBlock() error {
  	blockCount, err := reader.dec.ReadLong()
  	if err != nil {
  		return err
  	}
  
  	blockSize, err := reader.dec.ReadLong()
  	if err != nil {
  		return err
  	}
  
  	if blockSize > math.MaxInt32 || blockSize < 0 {
  		return fmt.Errorf("Block size invalid or too large: %d", blockSize)
  	}
  
  	block := reader.block
  	if block.Data == nil || int64(len(block.Data)) < blockSize {
  		block.Data = make([]byte, blockSize)
  	}
  	block.BlockRemaining = blockCount
  	block.NumEntries = blockCount
  	block.BlockSize = int(blockSize)
  	err = reader.dec.ReadFixedWithBounds(block.Data, 0, int(block.BlockSize))
  	if err != nil {
  		return err
  	}
  	syncBuffer := make([]byte, syncSize)
  	err = reader.dec.ReadFixed(syncBuffer)
  	if err != nil {
  		return err
  	}
  	if !bytes.Equal(syncBuffer, reader.header.Sync) {
  		return InvalidSync
  	}
  	reader.blockDecoder.SetBlock(reader.block)
  
  	return nil
  }
docs: // NextBlock tells this DataFileReader to skip current block and move to next one.
  // May return an error if the block is malformed or no more blocks left to read.