func (od *OfflineDatabase) Close() error {
	return od.database.Close()
}
Close frees resources associated with the database.
package pwnedpass
import (
	"bytes"
	"crypto/sha1"
	"encoding/binary"
	"encoding/hex"
	"errors"
	"fmt"
	"io"
	"net/http"
	"strconv"
	"strings"
	"sync"
	"golang.org/x/exp/mmap"
)
const (
	DatabaseFilename = "pwned-passwords.bin"
	IndexSegmentSize = 256 << 16 << 3  
	DataSegmentOffset = IndexSegmentSize
	caphextable = "0123456789ABCDEF"
)
var (
	FirstPrefix = [3]byte{0x00, 0x00, 0x00}
	LastPrefix = [3]byte{0xFF, 0xFF, 0xFF}
	bufferPool = &sync.Pool{New: func() interface{} {
		return make([]byte, 8<<10)
	}}
)
type (
	OfflineDatabase struct {
		database readCloserAt
	}
	readCloserAt interface {
		io.ReaderAt
		io.Closer
		Len() int
	}
)
func NewOfflineDatabase(dbFile string) (*OfflineDatabase, error) {
	db, err := mmap.Open(dbFile)
	if err != nil {
		return nil, fmt.Errorf("error opening index: %s", err)
	}
	odb := &OfflineDatabase{
		database: db,
	}
	return odb, nil
}