Skip to content

Commit a6d6164

Browse files
committed
README.md(s): fix GitHub actions links
...and some other additional links
1 parent 61e589e commit a6d6164

File tree

12 files changed

+36
-28
lines changed

12 files changed

+36
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# iqlusion crates <a href="https://www.iqlusion.io"><img src="https://storage.googleapis.com/iqlusion-production-web/img/logo/iqlusion-rings-sm.png" alt="iqlusion" width="24" height="24"></a> <a href="https://crates.io">📦</a>
1+
# iqlusion crates <a href="https://crates.io"><img src="https://storage.googleapis.com/iqlusion-production-web/github/companion-crate.png" alt="crate" width="24" height="24"></a> <a href="https://www.iqlusion.io"><img src="https://storage.googleapis.com/iqlusion-production-web/img/logo/iqlusion-rings-sm.png" alt="iqlusion" width="24" height="24"></a>
22

33
[![Apache 2.0 Licensed][license-image]][license-link]
44
![MSRV][msrv-image]

anomaly/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ without any additional terms or conditions.
8080
[rustc-image]: https://img.shields.io/badge/rustc-1.36+-blue.svg
8181
[safety-image]: https://img.shields.io/badge/unsafe-forbidden-success.svg
8282
[safety-link]: https://github.com/rust-secure-code/safety-dance/
83-
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg
83+
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg?branch=develop&event=push
8484
[build-link]: https://github.com/iqlusioninc/crates/actions
8585
[gitter-image]: https://badges.gitter.im/iqlusioninc/community.svg
8686
[gitter-link]: https://gitter.im/iqlusioninc/community

canonical-path/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ without any additional terms or conditions.
5555
[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg
5656
[license-link]: https://github.com/iqlusioninc/crates/blob/develop/LICENSE
5757
[rustc-image]: https://img.shields.io/badge/rustc-1.39+-blue.svg
58-
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg
58+
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg?branch=develop&event=push
5959
[build-link]: https://github.com/iqlusioninc/crates/actions
6060
[gitter-image]: https://badges.gitter.im/iqlusioninc/community.svg
6161
[gitter-link]: https://gitter.im/iqlusioninc/community

harp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ without any additional terms or conditions.
5757
[rustc-image]: https://img.shields.io/badge/rustc-1.39+-blue.svg
5858
[safety-image]: https://img.shields.io/badge/unsafe-forbidden-success.svg
5959
[safety-link]: https://github.com/rust-secure-code/safety-dance/
60-
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg
60+
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg?branch=develop&event=push
6161
[build-link]: https://github.com/iqlusioninc/crates/actions
6262
[gitter-image]: https://badges.gitter.im/iqlusioninc/community.svg
6363
[gitter-link]: https://gitter.im/iqlusioninc/community

hkd32/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ without any additional terms or conditions.
5353
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
5454
[license-link]: https://github.com/iqlusioninc/crates/blob/develop/LICENSE
5555
[rustc-image]: https://img.shields.io/badge/rustc-1.39+-blue.svg
56-
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg
56+
[build-image]: hhttps://github.com/iqlusioninc/crates/workflows/Rust/badge.svg?branch=develop&event=push
5757
[build-link]: https://github.com/iqlusioninc/crates/actions
5858
[gitter-image]: https://badges.gitter.im/iqlusioninc/community.svg
5959
[gitter-link]: https://gitter.im/iqlusioninc/community

secrecy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ without any additional terms or conditions.
6464
[rustc-image]: https://img.shields.io/badge/rustc-1.39+-blue.svg
6565
[safety-image]: https://img.shields.io/badge/unsafe-forbidden-success.svg
6666
[safety-link]: https://github.com/rust-secure-code/safety-dance/
67-
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg
67+
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg?branch=develop&event=push
6868
[build-link]: https://github.com/iqlusioninc/crates/actions
6969
[gitter-image]: https://badges.gitter.im/iqlusioninc/community.svg
7070
[gitter-link]: https://gitter.im/iqlusioninc/community

subtle-encoding/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ toplevel directory of this repository or [LICENSE-MIT] for details.
5151
[rustc-image]: https://img.shields.io/badge/rustc-1.39+-blue.svg
5252
[safety-image]: https://img.shields.io/badge/unsafe-forbidden-success.svg
5353
[safety-link]: https://github.com/rust-secure-code/safety-dance/
54-
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg
54+
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg?branch=develop&event=push
5555
[build-link]: https://github.com/iqlusioninc/crates/actions
5656
[gitter-image]: https://badges.gitter.im/iqlusioninc/community.svg
5757
[gitter-link]: https://gitter.im/iqlusioninc/community

tai64/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ without any additional terms or conditions.
5555
[rustc-image]: https://img.shields.io/badge/rustc-1.39+-blue.svg
5656
[safety-image]: https://img.shields.io/badge/unsafe-forbidden-success.svg
5757
[safety-link]: https://github.com/rust-secure-code/safety-dance/
58-
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg
58+
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg?branch=develop&event=push
5959
[build-link]: https://github.com/iqlusioninc/crates/actions
6060
[gitter-image]: https://badges.gitter.im/iqlusioninc/community.svg
6161
[gitter-link]: https://gitter.im/iqlusioninc/community

vint64/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,21 @@ little endian integers which optimizes for simplicity and performance.
1515

1616
## About
1717

18-
This crate implements a variable-length encoding for 64-bit little
19-
endian integers with a number of properties which make it superior in every
20-
way to other variable-length integer encodings like
21-
[LEB128], SQLite "Varuints" or CBOR:
18+
This crate implements a variable-length encoding for 64-bit little endian
19+
integers with a number of properties which make it superior in almost every
20+
way to other variable-length integer encodings like [LEB128], SQLite "Varuints",
21+
or CBOR:
2222

2323
- Capable of expressing the full 64-bit integer range with a maximum of 9-bytes
24+
- Provides the most compact encoding possible for every value in range
2425
- No loops involved in decoding: just (unaligned) loads, masks, and shifts
25-
- No complex branch-heavy logic - decoding is CTZ + shifts and sanity checks
26+
- No complex branch-heavy logic: decoding is CTZ + shifts and sanity checks
2627
- Total length of a `vint64` can be determined via the first byte alone
2728

2829
Some precedent for this sort of encoding can be found in the
2930
[Extensible Binary Meta Language] (used by e.g. the [Matroska]
3031
media container format), however note that the specific type of "vint"
31-
used by this format still requires a loop to decode.
32+
used by that format still requires a loop to decode.
3233

3334
## License
3435

@@ -54,16 +55,16 @@ without any additional terms or conditions.
5455

5556
[//]: # (badges)
5657

57-
[crate-image]: https://img.shields.io/crates/v/vint.svg
58-
[crate-link]: https://crates.io/crates/vint
59-
[docs-image]: https://docs.rs/vint/badge.svg
60-
[docs-link]: https://docs.rs/vint/
58+
[crate-image]: https://img.shields.io/crates/v/vint64.svg
59+
[crate-link]: https://crates.io/crates/vint64
60+
[docs-image]: https://docs.rs/vint64/badge.svg
61+
[docs-link]: https://docs.rs/vint64/
6162
[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg
6263
[license-link]: https://github.com/iqlusioninc/crates/blob/develop/LICENSE
6364
[rustc-image]: https://img.shields.io/badge/rustc-1.39+-blue.svg
6465
[safety-image]: https://img.shields.io/badge/unsafe-forbidden-success.svg
6566
[safety-link]: https://github.com/rust-secure-code/safety-dance/
66-
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg
67+
[build-image]: https://github.com/iqlusioninc/crates/workflows/Rust/badge.svg?branch=develop&event=push
6768
[build-link]: https://github.com/iqlusioninc/crates/actions
6869
[gitter-image]: https://badges.gitter.im/iqlusioninc/community.svg
6970
[gitter-link]: https://gitter.im/iqlusioninc/community

vint64/src/lib.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
//!
33
//! # About
44
//!
5-
//! This crate implements a variable-length encoding for 64-bit little
6-
//! endian integers with a number of properties which make it superior in every
7-
//! way to other variable-length integer encodings like
8-
//! [LEB128], SQLite "Varuints" or CBOR:
5+
//! This crate implements a variable-length encoding for 64-bit little endian
6+
//! integers with a number of properties which make it superior in almost every
7+
//! way to other variable-length integer encodings like [LEB128], SQLite "Varuints",
8+
//! or CBOR:
99
//!
1010
//! - Capable of expressing the full 64-bit integer range with a maximum of 9-bytes
11+
//! - Provides the most compact encoding possible for every value in range
1112
//! - No loops involved in decoding: just (unaligned) loads, masks, and shifts
12-
//! - No complex branch-heavy logic - decoding is CTZ + shifts and sanity checks
13+
//! - No complex branch-heavy logic: decoding is CTZ + shifts and sanity checks
1314
//! - Total length of a `vint64` can be determined via the first byte alone
1415
//!
1516
//! Some precedent for this sort of encoding can be found in the
1617
//! [Extensible Binary Meta Language] (used by e.g. the [Matroska]
1718
//! media container format), however note that the specific type of "vint"
18-
//! used by this format still requires a loop to decode.
19+
//! used by that format still requires a loop to decode.
1920
//!
2021
//! # Usage
2122
//!
@@ -24,6 +25,10 @@
2425
//! let encoded = vint64::encode(42);
2526
//! assert_eq!(encoded.as_ref(), &[0x55]);
2627
//!
28+
//! // Get the length of a `vint64` from its first byte.
29+
//! // NOTE: this is inclusive of the first byte itself.
30+
//! let encoded_len = vint64::length_hint(encoded.as_ref()[0]);
31+
//!
2732
//! // Decode an encoded vint64 with trailing data
2833
//! let mut slice: &[u8] = &[0x55, 0xde, 0xad, 0xbe, 0xef];
2934
//! let decoded = vint64::decode(&mut slice).unwrap();
@@ -119,7 +124,9 @@ impl TryFrom<&[u8]> for Vint64 {
119124
}
120125
}
121126

122-
/// Get the length of a `vint64` from the first byte
127+
/// Get the length of a `vint64` from the first byte.
128+
///
129+
/// NOTE: The returned value is inclusive of the first byte itself.
123130
pub fn length_hint(byte: u8) -> usize {
124131
byte.trailing_zeros() as usize + 1
125132
}

0 commit comments

Comments
 (0)