Extremely Fast Compression algorithm
This report presents the forensic synthetic code analysis of lz4/lz4, a C project with 11,929 GitHub stars. SynthScan v2.0 examined 34,975 lines of code across 130 source files, recording 91 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 3.0 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 91 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/check_stdvars.sh | 1 | #!/usr/bin/env sh | COMMENT |
| LOW | tests/test-lz4-speed.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | tests/fuzzer.c | 41 | # undef _GNU_SOURCE /* in case it's already defined */ | COMMENT |
| LOW | tests/fuzzer.c | 81 | #define FUZ_MAX_DICT_SIZE (1 << 15) | COMMENT |
| LOW | tests/abiTest.c | 21 | #include <stdlib.h> /* malloc, free, exit */ | COMMENT |
| LOW | tests/frametest.c | 41 | #include <string.h> /* strcmp */ | COMMENT |
| LOW | tests/fullbench.c | 41 | #include <sys/stat.h> /* stat64 */ | COMMENT |
| LOW | tests/freestanding.c | 1 | // Basic test for LZ4_FREESTANDING | COMMENT |
| LOW | tests/roundTripTest.c | 21 | * Tuning Constant | COMMENT |
| LOW | tests/checkFrame.c | 41 | #include <string.h> /* strcmp */ | COMMENT |
| LOW | programs/lz4io.c | 41 | # define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */ | COMMENT |
| LOW | programs/lz4io.c | 61 | #define LZ4F_STATIC_LINKING_ONLY | COMMENT |
| LOW | programs/lz4io.c | 81 | #define LZ4IO_SKIPPABLE0 0x184D2A50 | COMMENT |
| LOW | programs/util.h | 21 | #define UTIL_H_MODULE | COMMENT |
| LOW | programs/util.h | 41 | # include <sys/utime.h> /* utime */ | COMMENT |
| LOW | programs/util.h | 101 | ******************************************/ | COMMENT |
| LOW | programs/util.h | 121 | # endif | COMMENT |
| LOW | programs/util.h | 141 | # define UTIL_STAT_MODE_ISREG(st_mode) ((st_mode) & S_IFREG) | COMMENT |
| LOW | programs/util.h | 161 | ***************************************/ | COMMENT |
| LOW | programs/lz4cli.c | 41 | COMMENT | |
| LOW | programs/lz4cli.c | 61 | # define IO_MT "multithread" | COMMENT |
| LOW | programs/bench.c | 41 | #include <string.h> /* memset */ | COMMENT |
| LOW | programs/bench.c | 61 | #ifndef LZ4_GIT_COMMIT_STRING | COMMENT |
| LOW | programs/platform.h | 61 | /* ********************************************************* | COMMENT |
| LOW | programs/platform.h | 81 | * PLATFORM_POSIX_VERSION >= 1 is equal to found _POSIX_VERSION | COMMENT |
| LOW | programs/platform.h | 101 | # endif | COMMENT |
| LOW | programs/platform.h | 141 | # define SET_SPARSE_FILE_MODE(file) { DWORD dw; DeviceIoControl((HANDLE) _get_osfhandle(_fileno(file)), FSCTL_SET_SPA | COMMENT |
| LOW | examples/blockStreaming_lineByLine.c | 1 | // LZ4 streaming API example : line-by-line logfile compression | COMMENT |
| LOW | examples/bench_functions.c | 61 | COMMENT | |
| LOW | examples/bench_functions.c | 161 | run_screaming("Couldn't run LZ4_compress_fast_extState()... error code received is in exit code.", rv); | COMMENT |
| LOW | examples/blockStreaming_doubleBuffer.c | 1 | // LZ4 streaming API example : double buffer | COMMENT |
| LOW | examples/dictionaryRandomAccess.c | 1 | // LZ4 API example : Dictionary Random Access | COMMENT |
| LOW | lib/xxhash.h | 121 | * Note that no change is required within the calling program as long as it includes `xxhash.h` : | COMMENT |
| LOW | lib/lz4frame.c | 61 | #ifndef LZ4F_HEAPMODE | COMMENT |
| LOW | lib/lz4frame.c | 141 | * Debug | COMMENT |
| LOW | lib/lz4.h | 81 | * Enable exporting of functions when building a Windows DLL | COMMENT |
| LOW | lib/lz4.h | 121 | # endif | COMMENT |
| LOW | lib/lz4.h | 781 | * Deprecated functions make the compiler generate a warning when invoked. | COMMENT |
| LOW | lib/xxhash.c | 121 | * Compiler Specific Options | COMMENT |
| LOW | lib/xxhash.c | 181 | #endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ | COMMENT |
| LOW | lib/lz4.c | 121 | /*-************************************ | COMMENT |
| LOW | lib/lz4.c | 161 | * of LZ4_wildCopy8 does not affect the compression speed. | COMMENT |
| LOW | lib/lz4.c | 221 | # define ALLOC(s) LZ4_malloc(s) | COMMENT |
| LOW | lib/lz4.c | 241 | * Common Constants | COMMENT |
| LOW | lib/lz4.c | 261 | #define ML_BITS 4 | COMMENT |
| LOW | lib/lz4.c | 341 | * LZ4 relies on memcpy with a constant size being inlined. In freestanding | COMMENT |
| LOW | lib/lz4frame.h | 81 | # define LZ4FLIB_API __declspec(dllexport) LZ4FLIB_VISIBILITY | COMMENT |
| LOW | doc/lz4_manual.html | 601 | # if defined (__cplusplus) && (__cplusplus >= 201402) </b>/* C++14 or greater */<b> | COMMENT |
| LOW | ossfuzz/fuzz_helpers.h | 21 | #include <stdio.h> | COMMENT |
| LOW | ossfuzz/fuzz_helpers.h | 41 | */ | COMMENT |
| LOW | .circleci/config.yml | 1 | # This configuration was automatically generated from a CircleCI 1.0 config. | COMMENT |
| LOW | .circleci/config.yml | 21 | CIRCLE_ARTIFACTS: /tmp/circleci-artifacts | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/loremOut.h | 2 | loremOut.h - lorem ipsum generator to stdout | CODE |
| LOW | tests/loremOut.h | 28 | * Generate @size bytes of compressible data using lorem ipsum generator into stdout. | COMMENT |
| LOW | tests/decompress-partial-usingDict.c | 8 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\n" | CODE |
| LOW | tests/decompress-partial-usingDict.c | 8 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\n" | CODE |
| LOW | tests/decompress-partial-usingDict.c | 21 | "porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,\n" | CODE |
| LOW | tests/decompress-partial-usingDict.c | 21 | "porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,\n" | CODE |
| LOW | tests/decompress-partial.c | 6 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\n" | CODE |
| LOW | tests/decompress-partial.c | 6 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\n" | CODE |
| LOW | tests/decompress-partial.c | 19 | "porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,\n" | CODE |
| LOW | tests/decompress-partial.c | 19 | "porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,\n" | CODE |
| LOW | tests/loremOut.c | 2 | lorem.c - lorem ipsum generator to stdout | CODE |
| LOW | tests/loremOut.c | 27 | * Generates a stream of Lorem ipsum paragraphs to stdout, | COMMENT |
| LOW | programs/lorem.h | 2 | lorem.h - lorem ipsum generator | CODE |
| LOW | programs/lorem.h | 31 | * Generate @size bytes of compressible data using lorem ipsum generator | COMMENT |
| LOW | programs/README.md | 59 | When no file is provided, uses an internal Lorem Ipsum generator instead. | CODE |
| LOW | programs/lorem.c | 2 | lorem.c - lorem ipsum generator | CODE |
| LOW⚡ | programs/lorem.c | 28 | * This is a very simple lorem ipsum generator | COMMENT |
| LOW⚡ | programs/lorem.c | 35 | * The resulting compression / ratio curve of the lorem ipsum generator | COMMENT |
| LOW⚡ | programs/lorem.c | 40 | * The compression ratio achievable on the generated lorem ipsum | COMMENT |
| LOW | programs/lorem.c | 319 | /* It's "common" for lorem ipsum generators to start with the same first | COMMENT |
| LOW | programs/bench.c | 771 | "Lorem ipsum", | CODE |
| LOW | examples/bench_functions.c | 238 | * Test suite A) Uses generic Lorem Ipsum text which should be generally compressible insomuch as basic human text is | COMMENT |
| LOW | examples/bench_functions.c | 253 | const char src[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed luctus purus et risus vulputate, e | CODE |
| LOW | examples/bench_functions.c | 253 | const char src[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed luctus purus et risus vulputate, e | CODE |
| LOW | examples/simple_buffer.c | 41 | const char* const src = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor site amat."; | CODE |
| LOW | examples/simple_buffer.c | 41 | const char* const src = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor site amat."; | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-lz4-speed.py | 71 | except Exception: | CODE |
| LOW | tests/test-lz4-speed.py | 343 | except Exception as e: | CODE |
| MEDIUM | tests/test-lz4-speed.py | 68 | def does_command_exist(command): | CODE |
| MEDIUM | tests/test-lz4-abi.py | 48 | print('Error Code:', s.poll()) | CODE |
| MEDIUM | tests/test-lz4-versions.py | 53 | print('Error Code:', s.poll()) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test-lz4-speed.py | 209 | 'make clean && CPPFLAGS="-DLZ4_GIT_COMMIT=%s" make -C programs lz4 lz4c32 ' % version) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-lz4-speed.py | 18 | CODE | |
| LOW | tests/test-lz4-abi.py | 11 | CODE | |
| LOW | tests/test-lz4-abi.py | 13 | CODE | |
| LOW | tests/test-lz4-abi.py | 15 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-lz4-list.py | 65 | CODE | |
| LOW | tests/test-lz4-list.py | 117 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-lz4-speed.py | 89 | def send_email_with_attachments(branch, commit, last_commit, args, text, results_files, | CODE |