Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions review-enrichment/src/analyzers/binary-extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ export const BINARY_FILE_EXTENSIONS = [
"arrow",
"orc",
"msgpack",
// More common binary formats: audio/video containers, disk images, and ML artifacts.
"m4a",
"m4v",
"aac",
"opus",
"wma",
"aiff",
"flv",
"wmv",
"iso",
"dmg",
"pkl",
"pickle",
"joblib",
"tflite",
"keras",
] as const;

const BINARY_EXT_SET = new Set<string>(BINARY_FILE_EXTENSIONS);
Expand Down
7 changes: 7 additions & 0 deletions review-enrichment/test/binary-extensions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ test("isBinaryFileExtension and BINARY_EXT_RE agree on known binary paths", () =
"wire/msg.msgpack",
"native/mod.pyd",
"build/Release/addon.node",
"audio/track.m4a",
"audio/sound.opus",
"video/clip.flv",
"release/app.dmg",
"release/image.iso",
"models/scaler.pkl",
"models/model.tflite",
]) {
const ext = path.slice(path.lastIndexOf(".") + 1);
assert.equal(isBinaryFileExtension(ext), true, path);
Expand Down
Loading