Vonng/ac hiện có 663 sao trên GitHub, viết chủ yếu bằng C. Aho-Corasick Automaton with Double Array Trie (Multi-pattern substitute in go)
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
acdat is a PostgreSQL extension for compiling a large set of exact literal
patterns once and scanning each text or bytea value once. The first engine
uses an Aho-Corasick automaton packed into a Double-Array Trie.
The project is an active rewrite of the original 2018 Go benchmark. It remains
pre-1.0, but published format-major-1 machines are a compatibility contract:
new readers must continue to validate and scan them correctly.
What it is for
sensitive-word and policy-rule detection;
IOC, URL, hash, path, and fixed binary signature scanning;
log classification and routing;
large exact entity dictionaries;
one-pass redaction, alias normalization, and replacement;
ingestion-time extraction into an application-owned hit table.
ACDAT indexes the pattern set, not the document table. A query over an existing
large table still reads the candidate rows. For a few ad-hoc patterns, use
pg_trgm or PostgreSQL full-text search. For repeated reverse lookups over a
stable corpus, materialize (document_id, pattern_id, build_id) matches.
SQL namespace
The extension and its non-relocatable schema are both named acdat:
WITH machine AS (
SELECT acdat.compile(
ARRAY['he', 'she', 'his', 'hers'],
ARRAY[1, 2, 3, 4]::bigint[]
) AS value
)
SELECT acdat.contains('ushers', value)
FROM machine;
Compile directly from a relation:
SELECT acdat.compile(pattern, pattern_id, replacement, priority)
FROM app_keyword
WHERE enabled;
Enumerate overlapping matches. Text positions are 1-based; byte and character
coordinates are both returned:
SELECT *
FROM acdat.matches(
'发现病毒特征码',
acdat.compile(
ARRAY['病毒', '特征码'],
ARRAY[10, 11]::bigint[]
)
)
ORDER BY start_byte;
Source pattern tables remain application-owned. Publish and activate an
immutable build:
WITH machine AS (
SELECT acdat.compile(pattern, pattern_id)
FROM app_keyword
WHERE enabled
), published AS (
SELECT acdat.publish('moderation', 1, machine) AS build_id
FROM machine
)
SELECT acdat.activate('moderation', build_id)
FROM published;
Build IDs are content-addressed SHA-256 values. Metadata is included in logical
dumps; only active machine payloads are included, so a restored active
dictionary works immediately without dumping every historical artifact.
Control functions are SECURITY INVOKER and are not executable by PUBLIC.
The installer owns the catalog. A DBA can create and grant an acdat_admin
role outside the extension when delegated administration is required.
Build and test
Requirements: PostgreSQL server development headers, PGXS, a C11 compiler, and
GNU Make.
make
make install
make installcheck
make core-test
make bench-matrix
make upgrade-test
make dump-restore-test
make cache-smoke-test
make pg-matrix-test # Docker, PostgreSQL 14–18
make cross-version-test # PG14 Linux amd64 dump -> local PG18 restore
Run one standalone benchmark profile or the representative matrix:
PATTERNS=100000 PATTERN_BYTES=16 INPUT_MIB=16 make core-bench
BENCH_REPEATS=3 BENCH_INPUT_MIB=16 make bench-matrix
The matrix covers ordinary ASCII misses, root-only misses, hit-heavy input,
UTF-8 byte-oriented patterns, and a worst-overlap case. It reports build-search
work, artifact and materialized memory, occupancy, and scan throughput.
The current validation matrix covers PostgreSQL 14–18 on Linux amd64 with
-Werror, plus PostgreSQL 18.4 on macOS arm64. Linux arm64 and package-lab
verification remain additional validation targets.
Documentation:
Usage guide
Performance report
Benchmark notes
Changelog
A runnable end-to-end example is available at examples/demo.sql:
The original 2018 Go implementation remains on the
master branch. Its optional
10,318,163-line benchmark corpus is distributed as the
benchmark-data-2018
release instead of being stored in Git history. The corpus is not required to
build or test the PostgreSQL extension.
Safety and lifecycle
The machine type has a self-describing, checksummed, little-endian format with
text and binary I/O. Imported artifacts are structurally validated before use.
Hot scan expressions cache an already validated and materialized machine using
the TOAST pointer/build fingerprint, so a large value is not detoasted per row.
Version 0.1.1 also services PostgreSQL interrupts during DAT packing and places
a conservative input-relative limit on base-candidate searches.
DROP EXTENSION acdat deletes all managed dictionary state. It normally fails
when application objects depend on acdat.machine; using CASCADE can delete
dependent user columns or objects. Inventory dependencies and back up source
patterns before uninstalling.
License
acdat is distributed under the Apache License 2.0.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/Vonng/ac là nguồn chính thức.
Vonng/ac có bao nhiêu sao?
Vonng/ac có 663 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/Vonng/ac. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
Vonng/ac có phải mã nguồn mở không?
Có — Vonng/ac phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/Vonng/ac.
Vonng/ac còn đang phát triển không?
Commit gần nhất trên Vonng/ac là 2 tháng trước (theo timestamp GitHub). Repo có 107 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Vonng/ac dùng license gì?
Vonng/ac phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Vonng/ac là gì?
Vonng/ac (Vonng/ac) là dự án C trên GitHub. Theo mô tả gốc: Aho-Corasick Automaton with Double Array Trie (Multi-pattern substitute in go)
Vonng/ac viết bằng ngôn ngữ gì?
Vonng/ac chủ yếu viết bằng C. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về ac?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về ac.