func (db *DB) readHeaderCounts() error {
	var err error
	db.header.Cols, err = db.readUint8(1)
	if err != nil {
		return err
	}
	if db.header.Cols <= 0 {
		return fmt.Errorf("invalid db format")
	}
	db.header.Count, err = db.readUint32(5)
	if err != nil {
		return err
	}
	if db.header.Count <= 1 {
		return fmt.Errorf("invalid db format")
	}
	db.header.IPv4ColumnSize = db.header.Cols << 2
	return nil
}
// parses counts in db file header
parses counts in db file header
// parses counts in db file header
func (db *DB) readHeaderCounts() error {
	var err error
	db.header.Cols, err = db.readUint8(1)
	if err != nil {
		return err
	}
	if db.header.Cols <= 0 {
		return fmt.Errorf("invalid db format")
	}
	db.header.Count, err = db.readUint32(5)
	if err != nil {
		return err
	}
	if db.header.Count <= 1 {
		return fmt.Errorf("invalid db format")
	}
	db.header.IPv4ColumnSize = db.header.Cols << 2
	return nil
}
func ( db * DB ) readHeaderCounts ( ) error { var err error db . header . Cols , err = db . readUint8 ( 1 ) if err != nil { return err } if db . header . Cols <= 0 { return fmt . Errorf ( " " ) } db . header . Count , err = db . readUint32 ( 5 ) if err != nil { return err } if db . header . Count <= 1 { return fmt . Errorf ( " " ) } db . header . IPv4ColumnSize = db . header . Cols << 2 return nil }
parses counts in db file header
parses counts in db file header