xxhash 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +35 -0
- data/CHANGELOG.md +10 -1
- data/Gemfile +1 -1
- data/README.md +11 -6
- data/ext/xxhash/libxxhash.c +36 -881
- data/ext/xxhash/libxxhash.h +5452 -173
- data/ext/xxhash/xxhash.c +114 -10
- data/ext/xxhash/xxhash.h +3 -2
- data/lib/xxhash/version.rb +1 -1
- data/lib/xxhash.rb +8 -0
- data/test/xxhash_test.rb +31 -0
- metadata +7 -8
- data/.travis.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5f3e664005ea4c04fd83b2a4eda15bf6441b3b2b7d4e2b412ea2cd166338159f
|
4
|
+
data.tar.gz: ec7c7d32df90931dd84427ded616e4743f20ee2e481baede58adf1e403416d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e087365210b8f1cd51b03529848991e6505e8d8631d2abbd3074559d0c0f8fefe48708a59f39c099e8b3c2d5500278946f6a18e8df30ad4352d84d13ac342e47
|
7
|
+
data.tar.gz: 40d6b75717f0ff1ecc78ba423cdcf5d55dce1d7d29a5185121c290d2937dea8f3a6083b412771bc1e7cb25aa217af1815e3e2234c747b7c43f079559d82b2877
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ "master" ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ "master" ]
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
matrix:
|
25
|
+
ruby-version: ['3.1', '3.2', '3.3']
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v4
|
29
|
+
- name: Set up Ruby
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby-version }}
|
33
|
+
bundler-cache: true
|
34
|
+
- name: Run tests
|
35
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,13 @@
|
|
1
|
-
### 0.
|
1
|
+
### 0.6.0 (December 19, 2024)
|
2
|
+
* Update libxxhash to 0.8.1
|
3
|
+
* Drop old Rubies. Support only MRI 3.1+
|
4
|
+
* Modernize Ruby C API ussage, fix related warnings. (by [@casperisfine](https://github.com/casperisfine) and [@byroot](https://github.com/byroot))
|
5
|
+
|
6
|
+
### 0.5.0 (July 28, 2022)
|
7
|
+
* Mark extension as Ractor-safe (by [@kreynolds](https://github.com/kreynolds))
|
8
|
+
* Add ability to hash files by path directly with `XXhash.xxh32_file` and `XXhash.xxh64_file` (by [@kreynolds](https://github.com/kreynolds))
|
9
|
+
|
10
|
+
### 0.4.0 (December 11, 2016)
|
2
11
|
* Add xxHash to `Digest` module and make it more compatieble
|
3
12
|
with another hash functions from `Digest`. (by [@justinwsmith](https://github.com/justinwsmith))
|
4
13
|
* Add a `StreamingHash` class that's externally instantiatable. (by [@justinwsmith](https://github.com/justinwsmith))
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## xxHash [![
|
1
|
+
## xxHash [![Ruby](https://github.com/nashby/xxhash/actions/workflows/ruby.yml/badge.svg)](https://github.com/nashby/xxhash/actions/workflows/ruby.yml)
|
2
2
|
|
3
3
|
Ruby wrapper for [xxHash](https://github.com/Cyan4973/xxHash)
|
4
4
|
|
@@ -25,20 +25,25 @@ You can use it with `IO` objects too:
|
|
25
25
|
XXhash.xxh32_stream(StringIO.new('test'), 123) # => 2758658570
|
26
26
|
```
|
27
27
|
|
28
|
+
You can use it with file path directly, avoiding costly ruby-related operations.
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
XXhash.xxh32_file(__FILE__)
|
32
|
+
```
|
33
|
+
|
28
34
|
Note that you can also pass a chunk size as third param (it's 32 bytes by default)
|
29
35
|
|
30
|
-
XXH64 is also supported: you can use `xxh64
|
36
|
+
XXH64 is also supported: you can use `xxh64`, `xxh64_stream`, `.xxh64_file`.
|
31
37
|
|
32
38
|
### Supported Ruby versions
|
33
39
|
|
34
|
-
- MRI
|
35
|
-
- rbx-19mode
|
40
|
+
- MRI 3.1+
|
36
41
|
|
37
42
|
Note: It doesn't work on JRuby as it uses C extension.
|
38
43
|
|
39
44
|
### Versioning
|
40
45
|
|
41
|
-
Version 0.
|
46
|
+
Version 0.6.0 is equal to [0.8.1](https://github.com/Cyan4973/xxHash/tree/v0.8.1)
|
42
47
|
|
43
48
|
## Contributing
|
44
49
|
|
@@ -50,5 +55,5 @@ Version 0.4.0 is equal to [0.6.2](https://github.com/Cyan4973/xxHash/tree/v0.6.2
|
|
50
55
|
|
51
56
|
### Copyright
|
52
57
|
|
53
|
-
Copyright (c)
|
58
|
+
Copyright (c) 2024 Vasiliy Ermolovich. See LICENSE.txt for
|
54
59
|
further details.
|