pub fn register_compression_functions(conn: &Connection) -> Result<()>Expand description
Register all compression functions for the given SQLite connection.
This is a convenience function that calls all the register_*_functions functions.
Features must be enabled for the corresponding functions to be registered.
ยงExample
let db = Connection::open_in_memory()?;
register_compression_functions(&db)?;
let result: String = db.query_row("SELECT hex(gzip('hello'))", [], |r| r.get(0))?;
assert_eq!(&result, "1F8B08000000000000FFCB48CDC9C9070086A6103605000000");
let result: String = db.query_row("SELECT hex(gzip_decode(gzip(x'0123')))", [], |r| r.get(0))?;
assert_eq!(&result, "0123");
let result: bool = db.query_row("SELECT gzip_test(gzip(x'0123'))", [], |r| r.get(0))?;
assert_eq!(result, true);
let result: String = db.query_row("SELECT hex(brotli('hello'))", [], |r| r.get(0))?;
assert_eq!(&result, "0B028068656C6C6F03");