Skip to content

Commit c444721

Browse files
authoredMar 20, 2024··
Update locks (#16)
1 parent 7582861 commit c444721

File tree

4 files changed

+115
-127
lines changed

4 files changed

+115
-127
lines changed
 

‎.github/workflows/ci.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
- uses: Swatinem/rust-cache@v2
2525
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
2626
- run: just test
27+
- name: Check semver
28+
uses: obi1kenobi/cargo-semver-checks-action@v2
2729

2830
msrv:
2931
name: Test MSRV
@@ -117,9 +119,9 @@ jobs:
117119
EXTENSION_FILE: target/${{ matrix.target }}/release/examples/${{ matrix.file }}
118120
SQLITE3_BIN: ${{ matrix.sqlite3 }}
119121
run: ./tests/test-ext.sh
120-
# - name: Test ${{ matrix.target }} extension
121-
# if: matrix.target != 'aarch64-apple-darwin'
122-
# run: just sqlite3=${{ matrix.sqlite3 }} extension_file=target/${{ matrix.target }}/release/examples/${{ matrix.file }} test-ext
122+
# - name: Test ${{ matrix.target }} extension
123+
# if: matrix.target != 'aarch64-apple-darwin'
124+
# run: just sqlite3=${{ matrix.sqlite3 }} extension_file=target/${{ matrix.target }}/release/examples/${{ matrix.file }} test-ext
123125
- name: Package
124126
run: |
125127
pushd target/${{ matrix.target }}/release/examples

‎Cargo.lock

+84-113
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "sqlite-compressions"
3-
version = "0.2.4" # This value is also used in the README.md
3+
version = "0.2.5" # This value is also used in the README.md
44
description = "Compression, decompression, and testing functions for SQLite: gzip, brotli, ..."
55
authors = ["Yuri Astrakhan <YuriAstrakhan@gmail.com>"]
66
repository = "https://github.com/nyurik/sqlite-compressions"
77
edition = "2021"
88
license = "MIT OR Apache-2.0"
99
keywords = ["sqlite", "compression", "rusqlite", "gzip", "brotli"]
1010
categories = ["database", "compression"]
11-
rust-version = "1.71.1"
11+
rust-version = "1.74.1"
1212

1313
[lib]
1414
name = "sqlite_compressions"

‎README.md

+24-9
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
[![crates.io version](https://img.shields.io/crates/l/sqlite-compressions.svg)](https://github.com/nyurik/sqlite-compressions/blob/main/LICENSE-APACHE)
77
[![CI build](https://github.com/nyurik/sqlite-compressions/actions/workflows/ci.yml/badge.svg)](https://github.com/nyurik/sqlite-compressions/actions)
88

9+
Implement SQLite compression, decompression, and testing functions for Brotli and gzip encodings. Functions are
10+
available as a loadable extension, or as a Rust library.
911

10-
Implement SQLite compression, decompression, and testing functions for Brotli and gzip encodings. Functions are available as a loadable extension, or as a Rust library.
11-
12-
See also [SQLite-hashes](https://github.com/nyurik/sqlite-hashes) extension for MD5, SHA1, SHA224, SHA256, SHA384, SHA512, FNV1a, xxHash hashing functions.
12+
See also [SQLite-hashes](https://github.com/nyurik/sqlite-hashes) extension for MD5, SHA1, SHA224, SHA256, SHA384,
13+
SHA512, FNV1a, xxHash hashing functions.
1314

1415
## Usage
1516

16-
This SQLite extension adds functions for brotli and gzip compressions like `gzip(data, [quality])`, decoding `gzip_decode(data)`, and testing `gzip_test(data)` functions. Both encoding and decoding return blobs, and the testing function returns a true/false. The encoding functions can encode text and blob values, but will raise an error on other types like integers and floating point numbers. All functions will return `NULL` if the input data is `NULL`.
17+
This SQLite extension adds functions for brotli and gzip compressions like `gzip(data, [quality])`,
18+
decoding `gzip_decode(data)`, and testing `gzip_test(data)` functions. Both encoding and decoding return blobs, and the
19+
testing function returns a true/false. The encoding functions can encode text and blob values, but will raise an error
20+
on other types like integers and floating point numbers. All functions will return `NULL` if the input data is `NULL`.
1721

1822
### Extension
23+
1924
To use as an extension, load the `libsqlite_compressions.so` shared library into SQLite.
2025

2126
```bash
@@ -30,7 +35,11 @@ sqlite> SELECT brotli_test(x'8B058048656C6C6F20776F726C642103');
3035
```
3136

3237
### Rust library
33-
To use as a Rust library, add `sqlite-compressions` to your `Cargo.toml` dependencies. Then, register the needed functions with `register_compression_functions(&db)`. This will register all available functions, or you can use `register_gzip_functions(&db)` or `register_brotli_functions(&db)` to register just the needed ones (you may also disable the default features to reduce compile time and binary size).
38+
39+
To use as a Rust library, add `sqlite-compressions` to your `Cargo.toml` dependencies. Then, register the needed
40+
functions with `register_compression_functions(&db)`. This will register all available functions, or you can
41+
use `register_gzip_functions(&db)` or `register_brotli_functions(&db)` to register just the needed ones (you may also
42+
disable the default features to reduce compile time and binary size).
3443

3544
```rust
3645
use sqlite_compressions::{register_compression_functions, rusqlite::Connection};
@@ -59,7 +68,9 @@ fn main() {
5968
```
6069

6170
## Crate features
62-
By default, this crate will compile with all features. You can enable just the ones you need to reduce compile time and binary size.
71+
72+
By default, this crate will compile with all features. You can enable just the ones you need to reduce compile time and
73+
binary size.
6374

6475
```toml
6576
[dependencies]
@@ -70,13 +81,17 @@ sqlite-compressions = { version = "0.2", default-features = false, features = ["
7081
* **brotli** - enable Brotli compression support
7182
* **gzip** - enable GZIP compression support
7283

73-
The **loadable_extension** feature should only be used when building a `.so` / `.dylib` / `.dll` extension file that can be loaded directly into sqlite3 executable.
84+
The **loadable_extension** feature should only be used when building a `.so` / `.dylib` / `.dll` extension file that can
85+
be loaded directly into sqlite3 executable.
7486

7587
## Development
76-
* This project is easier to develop with [just](https://github.com/casey/just#readme), a modern alternative to `make`. Install it with `cargo install just`.
88+
89+
* This project is easier to develop with [just](https://github.com/casey/just#readme), a modern alternative to `make`.
90+
Install it with `cargo install just`.
7791
* To get a list of available commands, run `just`.
7892
* To run tests, use `just test`.
79-
* On `git push`, it will run a few validations, including `cargo fmt`, `cargo clippy`, and `cargo test`. Use `git push --no-verify` to skip these checks.
93+
* On `git push`, it will run a few validations, including `cargo fmt`, `cargo clippy`, and `cargo test`.
94+
Use `git push --no-verify` to skip these checks.
8095

8196
## License
8297

0 commit comments

Comments
 (0)
Please sign in to comment.