Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juancarlospaco/nim-crc32
CRC-32 In-place for Nim.
https://github.com/juancarlospaco/nim-crc32
checksum crc32 nim nim-lang
Last synced: about 10 hours ago
JSON representation
CRC-32 In-place for Nim.
- Host: GitHub
- URL: https://github.com/juancarlospaco/nim-crc32
- Owner: juancarlospaco
- Created: 2018-05-06T00:03:49.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-27T15:32:02.000Z (5 months ago)
- Last Synced: 2024-11-28T03:06:43.235Z (about 2 months ago)
- Topics: checksum, crc32, nim, nim-lang
- Language: Nim
- Homepage:
- Size: 30.3 KB
- Stars: 15
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-nim - crc32 - CRC32 for Nim. Just pass the thing you want to do CRC. (Algorithms / Cryptography)
README
# CRC32
CRC32 for Nim, 2 proc.
Its just a `proc` so no much to document about it, just pass the thingy you want to do CRC.- Works with `--gc:arc`, `--gc:orc`, `--panics:on`, `--experimental:strictFuncs`, C, C++, JavaScript.
- Uses `system.nim` only, does not import anything from stdlib. Works in-place, can out-place using `sugar.dup`.# Use
```nim
from std/sugar import dup # Optional, to out-place.var x = "The quick brown fox jumps over the lazy dog."
crc32(x) ## In-Place.
doAssert x == "519025E9"
doAssert "The quick brown fox jumps over the lazy dog.".dup(crc32) == "519025E9" ## Out-Place.var e = " "
crc32(e) ## In-Place.
doAssert e == "E96CCF45"
doAssert " ".dup(crc32) == "E96CCF45" ## Out-Place.var z = ""
crc32(z) ## In-Place.
doAssert z == "00000000"
doAssert "".dup(crc32) == "00000000" ## Out-Place.var f = "crc32.nim"
crc32FromFile(f) ## In-Place.
echo f
echo "crc32.nim".dup(crc32FromFile) ## Out-Place.
```# Install
```
nimble install crc32
```# Stars
![](https://starchart.cc/juancarlospaco/nim-crc32.svg)
:star: [@juancarlospaco](https://github.com/juancarlospaco '2022-02-16')
:star: [@adokitkat](https://github.com/adokitkat '2022-07-05')
:star: [@elcritch](https://github.com/elcritch '2022-10-10')
:star: [@hamidb80](https://github.com/hamidb80 '2022-10-10')
:star: [@amit-gshe](https://github.com/amit-gshe '2022-11-23')
:star: [@Seanld](https://github.com/Seanld '2024-08-27')