martin/mbtiles/Cargo.toml
Yuri Astrakhan ccd550a2cf
Add binary diff for mbtiles (#1358)
* `mbtiles diff` now has an additional `--patch-type` param with
`whole`, `bin-diff-raw` and `bin-diff-gz` values:
* `whole` stores different tiles as before - as whole tiles in the
`tiles` table
* `bin-diff-raw` computes binary difference between tiles, and stores
them as brotli-encoded value in a `bsdiffraw` table, together with a
`xxh3_64` hash of the tile as it will be stored after patching
* `bin-diff-gz` same as `bin-diff-raw`, but assumes the tiles are
gzip-compressed, so it uncompresses them before comparing. The `xxh3_64`
stores the hash of the uncompressed tile. The data will be stored in the
`bsdiffrawgz` table (identical structure with above)

* `mbtiles copy --apply-patch` will automatically detect if
`bsdiffrawgz` or `bsdiffraw` tables exist, and will use binary patching.
* `mbtiles apply-patch` does not support binary patching yet
* `mbtiles copy --diff-with-file ... --patch-type ...` is an alias to
`mbtiles diff --patch-type ...`
2024-06-25 19:34:14 +00:00

62 lines
1.7 KiB
TOML

lints.workspace = true
[package]
name = "mbtiles"
version = "0.10.0"
authors = ["Yuri Astrakhan <YuriAstrakhan@gmail.com>", "MapLibre contributors"]
description = "A simple low-level MbTiles access and processing library, with some tile format detection and other relevant heuristics."
keywords = ["mbtiles", "maps", "tiles", "mvt", "tilejson"]
categories = ["science::geo", "database"]
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
[features]
default = ["cli"]
cli = ["dep:anyhow", "dep:clap", "dep:env_logger", "dep:serde_yaml"]
[dependencies]
enum-display.workspace = true
flume.workspace = true
futures.workspace = true
itertools.workspace = true
log.workspace = true
martin-tile-utils.workspace = true
md5.workspace = true
num_cpus.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_with.workspace = true
size_format.workspace = true
sqlite-compressions.workspace = true
sqlite-hashes.workspace = true
sqlx.workspace = true
thiserror.workspace = true
tilejson.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }
xxhash-rust.workspace = true
# Bin dependencies
anyhow = { workspace = true, optional = true }
clap = { workspace = true, optional = true }
env_logger = { workspace = true, optional = true }
serde_yaml = { workspace = true, optional = true }
[dev-dependencies]
# For testing, might as well use the same async framework as the Martin itself
actix-rt.workspace = true
ctor.workspace = true
env_logger.workspace = true
insta = { workspace = true, features = ["toml", "yaml"] }
pretty_assertions.workspace = true
rstest.workspace = true
[lib]
path = "src/lib.rs"
[[bin]]
name = "mbtiles"
path = "src/bin/mbtiles.rs"
required-features = ["cli"]