mirror of
1
Fork 0
gotosocial/vendor/github.com/ncruces/go-sqlite3/util/sql3util/sql3util.go

10 lines
253 B
Go
Raw Normal View History

2024-10-25 18:09:18 +02:00
// Package sql3util implements SQLite utilities.
package sql3util
// ValidPageSize returns true if s is a valid page size.
//
// https://sqlite.org/fileformat.html#pages
func ValidPageSize(s int) bool {
return 512 <= s && s <= 65536 && s&(s-1) == 0
}