code: func newDataFileReaderBytes(buf []byte, datumReader DatumReader) (reader *DataFileReader, err error) {
  	if len(buf) < len(magic) || !bytes.Equal(magic, buf[0:4]) {
  		return nil, NotAvroFile
  	}
  
  	dec := NewBinaryDecoder(buf)
  	blockDecoder := NewBinaryDecoder(nil)
  	reader = &DataFileReader{
  		data:         buf,
  		dec:          dec,
  		blockDecoder: blockDecoder,
  		datum:        datumReader,
  	}
  
  	if reader.header, err = readObjFileHeader(dec); err != nil {
  		return nil, err
  	}
  
  	schema, err := ParseSchema(string(reader.header.Meta[schemaKey]))
  	if err != nil {
  		return nil, err
  	}
  	reader.datum.SetSchema(schema)
  	reader.block = &DataBlock{}
  
  	if reader.hasNextBlock() {
  		if err := reader.NextBlock(); err != nil {
  			return nil, err
  		}
  	}
  
  	return reader, nil
  }
docs: // separated out mainly for testing currently, will be refactored later for io.Reader paradigm