-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to cleanup and prepare for directory caching
* there is no point in returning type and compression with every `get_tile` -- PMTiles keeps this data in the header, so it is constant, and if the user needs it, they can get it directly. Returns `bytes` now. * add `Entry::is_leaf` helper * add `Header::get_bounds` and `Header::get_center` (tilejson structs) * no need for `AsyncPmTilesReader<B: ...>` type - it has to be specified in the impl anyway * no need for the `backend::read_initial_bytes` - it is only used once, has default implementation anyway. Inlined. * inlined `read_directory_with_backend` - used once and tiny * split up the `find_tile_entry` into two functions - I will need this later to add caching -- the root entry is permanently cached as part of the main struct, but the other ones are not, so needs a different code path. * added `cargo test` for default features
- Loading branch information
Showing
8 changed files
with
91 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "pmtiles" | ||
version = "0.3.1" | ||
version = "0.4.0" | ||
edition = "2021" | ||
authors = ["Luke Seelenbinder <[email protected]>"] | ||
license = "MIT OR Apache-2.0" | ||
|
@@ -36,10 +36,10 @@ tokio = { version = "1", default-features = false, features = ["io-util"], optio | |
varint-rs = "2" | ||
|
||
[dev-dependencies] | ||
flate2 = "1" | ||
fmmap = { version = "0.3", features = ["tokio-async"] } | ||
reqwest = { version = "0.11", features = ["rustls-tls-webpki-roots"] } | ||
tokio = { version = "1", features = ["test-util", "macros", "rt"] } | ||
flate2 = "1" | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters