3 个版本 (破坏性更新)

使用旧的 Rust 2015

0.3.0 2018年5月7日
0.2.0 2018年3月30日
0.1.0 2018年2月22日

文本处理 中排名第 1155

每月下载量 28
用于 dedup

MIT/Apache

13KB
252

Build Status Build status

用 Rust 编写的更好的去重程序。

基本用法:dedup <INPUT> [-o <OUTPUTFILE>]

运行 dedup --help 查看

USAGE:
    dedup.exe [FLAGS] [OPTIONS] [INPUT]

FLAGS:
    -l, --count-lines        If flag is set only print the number of unique entries found.
        --mmap               Enables use of memory mapped files. This is enabled by default.
        --no-mmap            Prohibits usage of memory mapped files. This will slow down the deduplication process
                             significantly!
    -z, --zero-terminated    Specifies that entries should be intepreted as being separated by a null byte rather than a
                             newline.
    -h, --help               Prints help information
    -V, --version            Prints version information

OPTIONS:
    -o, --output <OUTPUT>
        --terminator <TERMINATOR>    Specifies the single-byte pattern to separate entries by. Default is newline.
                                     [default: \n]

ARGS:
    <INPUT>    Specifies the input file to read from. Omit or supply '-' to read from stdin.

要运行基准测试,请运行 python benchsuite/benchrunner。这将下载一个大的(400MB+)文本文件作为基准测试用例。

欢迎提出功能请求和错误报告!请在此 Github 仓库中提出问题。


lib.rs:

此 crate 提供了一个函数:fastchr,该函数可以非常快速地在切片中找到给定字节的第一个出现位置。fastchr 使用 SIMD 内置函数和运行时 CPU 特性检测来实现,因此它将始终使用平台上的最快方法。如果 SIMD 特性不可用,则 fastchr 将回退到使用 memchr

依赖项

~170–315KB