aboutsummaryrefslogtreecommitdiff
path: root/lib/std/hash/crc.zig
AgeCommit message (Collapse)Author
2024-04-28std.hash.crc: simplify apiMarc Tiehuis
This removes the two original implementations in favour of the single generic one based on the Algorithm type. Previously we had three, very similar implementations which was somewhat confusing when knowing what one should actually be used. The previous polynomials all have equivalent variants available when using the Algorithm type.
2024-04-11std.hash.crc: get rid of usingnamespaceBrandon Black
This flips things around such that std/hash/crc.zig is generated by the catalog-based generation tool, and the real code that used to be in that file is moved out to std/hash/crc/impl.zig. The generated tests are moved to std/hash/crc/test.zig. By going this route, we eliminate the need for usingnamespace without changing anything for callers of these interfaces. The Crc32 tests are simply added to the fixed part of the generated output and compactified a bit. This was the second-to-last usage of usingnamespace left in std.
2023-10-31std.builtin.Endian: make the tags lower caseAndrew Kelley
Let's take this breaking change opportunity to fix the style of this enum.
2023-10-31mem: fix ub in writeIntJacob Young
Use inline to vastly simplify the exposed API. This allows a comptime-known endian parameter to be propogated, making extra functions for a specific endianness completely unnecessary.
2023-09-02std/hash: add generic tests for idempotency/iterative apiMarc Tiehuis
2023-07-24Use builtin inference over @as where possibleZachary Raineri
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-05-07convert s[start..start+len] to s[start..][0..len]dweiller
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2023-01-22Rewrite update_crc_catalog in zig and move tests to separate filefn ⌃ ⌥
2023-01-21std.hash.crc: implement algorithms listed in CRC RevEng catalogfn ⌃ ⌥
2022-12-14std: remove OOM workaroundsAndrew Kelley
No longer needed since stage1 is deleted.
2021-10-04migrate from `std.Target.current` to `@import("builtin").target`Andrew Kelley
closes #9388 closes #9321
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-05-08Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * doc/langref.html.in * lib/std/enums.zig * lib/std/fmt.zig * lib/std/hash/auto_hash.zig * lib/std/math.zig * lib/std/mem.zig * lib/std/meta.zig * test/behavior/alignof.zig * test/behavior/bitcast.zig * test/behavior/bugs/1421.zig * test/behavior/cast.zig * test/behavior/ptrcast.zig * test/behavior/type_info.zig * test/behavior/vector.zig Master branch added `try` to a bunch of testing function calls, and some lines also had changed how to refer to the native architecture and other `@import("builtin")` stuff.
2021-05-08std: update usage of std.testingVeikka Tuominen
2021-04-28std: remove redundant comptime keywordAndrew Kelley
@g-w1's fancy new compile error in action
2021-01-02std: disable a couple tests on windowsAndrew Kelley
They are passing but we're hitting OOM on the Windows CI server. This is to buy us more time until stage2 rescues us from the CI memory crisis.
2020-12-31Year++Frank Denis
2020-09-13std: Make the CRC32 calculation slightly fasterLemonBoy
Speed up a little the slicing-by-8 code path by replacing the (load+shift+xor)*4 sequence with a single u32 load plus a xor. Before: ``` iterative: 1018 MiB/s [000000006c3b110d] small keys: 1075 MiB/s [0035bf3dcac00000] ``` After: ``` iterative: 1114 MiB/s [000000006c3b110d] small keys: 1324 MiB/s [0035bf3dcac00000] ```
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-01-18std: use non-exhaustive enums from crc moduledaurnimator
Un-reverts PR #3118
2019-11-08update the codebase to use `@as`Andrew Kelley
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221