Skip to content

Commit 761186e

Browse files
committed
release 1.3.0
1 parent 61aa02d commit 761186e

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "crc32fast"
3-
version = "1.2.2"
3+
version = "1.3.0"
44
license = "MIT OR Apache-2.0"
55
authors = [
66
"Sam Rijs <[email protected]>",

README.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
# crc32fast [![Build Status][travis-img]][travis] [![Crates.io][crates-img]][crates] [![Documentation][docs-img]][docs]
22

3-
[travis-img]: https://travis-ci.com/srijs/rust-crc32fast.svg?branch=master
4-
[travis]: https://travis-ci.com/srijs/rust-crc32fast
5-
[crates-img]: https://img.shields.io/crates/v/crc32fast.svg
6-
[crates]: https://crates.io/crates/crc32fast
7-
[docs-img]: https://docs.rs/crc32fast/badge.svg
8-
[docs]: https://docs.rs/crc32fast
3+
[travis-img]: https://travis-ci.com/srijs/rust-crc32fast.svg?branch=master
4+
[travis]: https://travis-ci.com/srijs/rust-crc32fast
5+
[crates-img]: https://img.shields.io/crates/v/crc32fast.svg
6+
[crates]: https://crates.io/crates/crc32fast
7+
[docs-img]: https://docs.rs/crc32fast/badge.svg
8+
[docs]: https://docs.rs/crc32fast
99

1010
_Fast, SIMD-accelerated CRC32 (IEEE) checksum computation_
1111

1212
## Usage
1313

14+
### Simple usage
15+
16+
For simple use-cases, you can call the `hash` convenience function to
17+
directly compute the CRC32 checksum for a given byte slice:
18+
1419
```rust
15-
extern crate crc32fast;
20+
let checksum = crc32fast::hash(b"foo bar baz");
21+
```
1622

23+
### Advanced usage
24+
25+
For use-cases that require more flexibility or performance, for example when
26+
processing large amounts of data, you can create and manipulate a `Hasher`:
27+
28+
```rust
1729
use crc32fast::Hasher;
1830

1931
let mut hasher = Hasher::new();
@@ -33,10 +45,10 @@ Calling the `Hasher::new` constructor at runtime will perform a feature detectio
3345
optimal implementation for the current CPU feature set.
3446

3547
| crate | version | variant | ns/iter | MB/s |
36-
|-------------------------------------|---------|-----------|---------|------|
37-
| [crc](https://crates.io/crates/crc) | 1.8.1 | n/a | 4,926 | 207 |
38-
| crc32fast (this crate) | 1.0.0 | baseline | 683 | 1499 |
39-
| crc32fast (this crate) | 1.0.0 | pclmulqdq | 140 | 7314 |
48+
| ----------------------------------- | ------- | --------- | ------- | ---- |
49+
| [crc](https://crates.io/crates/crc) | 1.8.1 | n/a | 4,926 | 207 |
50+
| crc32fast (this crate) | 1.0.0 | baseline | 683 | 1499 |
51+
| crc32fast (this crate) | 1.0.0 | pclmulqdq | 140 | 7314 |
4052

4153
## Memory Safety
4254

@@ -67,10 +79,10 @@ Currently, enabling this feature flag will make the optimized `aarch64` implemen
6779

6880
This project is licensed under either of
6981

70-
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
71-
http://www.apache.org/licenses/LICENSE-2.0)
72-
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
73-
http://opensource.org/licenses/MIT)
82+
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
83+
http://www.apache.org/licenses/LICENSE-2.0)
84+
- MIT license ([LICENSE-MIT](LICENSE-MIT) or
85+
http://opensource.org/licenses/MIT)
7486

7587
at your option.
7688

0 commit comments

Comments
 (0)