-
Notifications
You must be signed in to change notification settings - Fork 721
Use file content heuristics to decide file reader. #1962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Dimi1010
wants to merge
52
commits into
seladb:dev
Choose a base branch
from
Dimi1010:feature/heuristic-file-selection
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 28 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
02de760
Added heuristics file content detector that determines the content ba…
Dimi1010 d2b6339
Merge remote-tracking branch 'upstream/dev' into feature/heuristic-fi…
Dimi1010 685dd9f
Moved stream checkpoint outside format detector as it is not directly…
Dimi1010 40dee69
Added a new factory function `createReader` that uses the new heurist…
Dimi1010 f1e3e18
Add <algorithm> include.
Dimi1010 8da1790
Added unit tests.
Dimi1010 3ad51e2
Deprecated old factory function.
Dimi1010 15c2000
Add byte-swapped zstd magic number.
Dimi1010 17af8d4
Lint
Dimi1010 46418ec
Move enum closer to first usage.
Dimi1010 3d713ab
Added unit tests for file reader device factory.
Dimi1010 a2391ec
Revert indentation.
Dimi1010 ea328d7
Fixed StreamCheckpoint to restore original stream state.
Dimi1010 db86c3e
Merge branch 'dev' into feature/heuristic-file-selection
Dimi1010 4aed9bd
Merge branch 'dev' into feature/heuristic-file-selection
Dimi1010 a83ae2b
Moved isStreamSeekable helper to inside `CaptureFileFormatDetector`.
Dimi1010 916e872
Added pcap magic number for Alexey Kuznetzov's modified pcap format.
Dimi1010 022529f
Merge remote-tracking branch 'upstream/dev' into feature/heuristic-fi…
Dimi1010 169fcd2
Split the unit test into multiple smaller tests.
Dimi1010 db8c848
Merge branch 'dev' into feature/heuristic-file-selection
Dimi1010 3e74912
Merge remote-tracking branch 'upstream/dev' into feature/heuristic-fi…
Dimi1010 f1613c4
Added helper to indicate if ZstSupport is enabled for PcapNg devices.
Dimi1010 bc2bacd
Split pcap microsecond and nanosecond file heuristics tests.
Dimi1010 58ac45d
Skipping Zst test case if zst is not supported.
Dimi1010 3b4b5ad
Due to file heuristics returning PcapNG format on Zstd archive, if Zs…
Dimi1010 18379b4
Lint
Dimi1010 8a4f6f8
Added invalid device factory to pcap tag.
Dimi1010 7776e0e
Updated static zst archives to be actual archives.
Dimi1010 4f52f59
Centralized PTF test name width under a macro.
Dimi1010 88ebfff
Add Pcap++Test header files to test sources for IDE tooling.
Dimi1010 41fe188
Fixed test output formatting.
Dimi1010 c8ae4f8
Lint
Dimi1010 c7cab2b
Typo fix.
Dimi1010 6d55077
Merge remote-tracking branch 'upstream/dev' into feature/heuristic-fi…
Dimi1010 682eeac
Shortened test names.
Dimi1010 07804da
Simplified invalid file test.
Dimi1010 9c4fc08
Simplified ZST tests.
Dimi1010 d975157
Added snoop test.
Dimi1010 40530df
Expanded granularity of file format detection.
Dimi1010 96a61b2
Marked `checkSupport` functions as constexpr to enable compile time o…
Dimi1010 55a6b7a
Exclude json from pre-commit cppcheck as it is slow due to many defin…
Dimi1010 3ab14e7
Lint
Dimi1010 5dd9a30
Fix runtime side effects inside constexpr function.
Dimi1010 45ad769
Added a secondary factory function to separate mixed error handling m…
Dimi1010 d24a9ad
Revert deprecation message, as doxygen is unhappy.
Dimi1010 f5ff879
Update tests.
Dimi1010 2c1b2c4
Update deprecation warning to point to the function closer to the sig…
Dimi1010 8d1ed1d
Catch general exception instead of runtime error.
Dimi1010 0ea2da9
Shortened deprecation message due to pre-commit warnings when its is …
Dimi1010 c209c90
Fix braces.
Dimi1010 8d77aa0
Simplfy test.
Dimi1010 af12d2f
Added tests for createReader failures.
Dimi1010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Tests/Pcap++Test/PcapExamples/file_heuristics/bogus-content.pcap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4561d5a474d6as465d8as41d1as6531863d1as65d1a36d1 |
1 change: 1 addition & 0 deletions
1
Tests/Pcap++Test/PcapExamples/file_heuristics/bogus-content.pcapng
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4561d5a474d6as465d8as41d1as6531863d1as65d1a36d1 |
1 change: 1 addition & 0 deletions
1
Tests/Pcap++Test/PcapExamples/file_heuristics/bogus-content.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4561d5a474d6as465d8as41d1as6531863d1as65d1a36d1 |
1 change: 1 addition & 0 deletions
1
Tests/Pcap++Test/PcapExamples/file_heuristics/bogus-content.zst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4561d5a474d6as465d8as41d1as6531863d1as65d1a36d1 |
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+88 Bytes
Tests/Pcap++Test/PcapExamples/file_heuristics/pcap-with-dat-ext.pcap.dat
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11.1 KB
Tests/Pcap++Test/PcapExamples/file_heuristics/pcapng-example.pcapng.zst
Binary file not shown.
Binary file added
BIN
+11.1 KB
Tests/Pcap++Test/PcapExamples/file_heuristics/pcapng-example.pcapng.zstd
Binary file not shown.
Binary file added
BIN
+25.6 KB
Tests/Pcap++Test/PcapExamples/file_heuristics/pcapng-with-pcap-ext.pcapng.pcap
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.