func (db *DB) readByteSlice(pos uint32) ([]byte, error) {
	if pos > db.dataSize-1 {
		return nil, io.EOF
	}
	size, err := db.readUint8(pos)
	if err != nil {
		return nil, err
	}
	if size == 0 {
		return nil, nil
	}
	if pos+uint32(size) > db.dataSize {
		return nil, io.EOF
	}
	b := make([]byte, size)
	for i := uint8(0); i < size; i++ {
		b[i] = db.data[pos+uint32(1+i)]
	}
	return b, nil
}
// reads a byte slice at position in file
reads a byte slice at position in file
// reads a byte slice at position in file
func (db *DB) readByteSlice(pos uint32) ([]byte, error) {
	if pos > db.dataSize-1 {
		return nil, io.EOF
	}
	size, err := db.readUint8(pos)
	if err != nil {
		return nil, err
	}
	if size == 0 {
		return nil, nil
	}
	if pos+uint32(size) > db.dataSize {
		return nil, io.EOF
	}
	b := make([]byte, size)
	for i := uint8(0); i < size; i++ {
		b[i] = db.data[pos+uint32(1+i)]
	}
	return b, nil
}
func ( db * DB ) readByteSlice ( pos uint32 ) ( [ ] byte , error ) { if pos > db . dataSize - 1 { return nil , io . EOF } size , err := db . readUint8 ( pos ) if err != nil { return nil , err } if size == 0 { return nil , nil } if pos + uint32 ( size ) > db . dataSize { return nil , io . EOF } b := make ( [ ] byte , size ) for i := uint8 ( 0 ) ; i < size ; i ++ { b [ i ] = db . data [ pos + uint32 ( 1 + i ) ] } return b , nil }
reads a byte slice at position in file
reads a byte slice at position in file