-
Notifications
You must be signed in to change notification settings - Fork 179
Introduce BufferReader and eliminate a bunch of allocations #393
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
6392506
Eliminate allocation in PhotoshopReader
iamcarbon 722774a
Use switch expressions
iamcarbon 4df2738
Add BufferReader
iamcarbon 224eade
Eliminate two allocations in FlirReader
iamcarbon 461a6b4
Eliminate allocation in OlympusMakernoteDirectory
iamcarbon cbe2d09
Eliminate various allocations in BplistReader
iamcarbon a26f6f3
Eliminate allocation in JpegReader
iamcarbon d84ae43
Eliminate allocation in PngChromaticities
iamcarbon 6f33bc8
Eliminate allocation in PngDescriptor
iamcarbon 5d34c55
Eliminate allocation in PngHeader
iamcarbon 189d66f
Eliminate a few allocations in PngMetadataReader
iamcarbon 76c687e
Eliminate allocation in WavFactHandler
iamcarbon 27c9846
Use Assert.Debug
iamcarbon 5bb02b1
Ensure BufferReader operates on buffers <= 2GB
iamcarbon f53892b
Fix offset in BufferReader.GetBytes
iamcarbon a89e1f0
Rename BufferReader.Skip -> Advance
iamcarbon db65fa5
Fix assert order
iamcarbon f7ee272
Verify JpegSegment sizes before reading data
iamcarbon 94eec47
Bring back exceptions on BufferReader
iamcarbon 73143a7
Fix switch statement
iamcarbon 945686f
Slice span to avoid extra copy in BufferReader
iamcarbon 5205495
Validate buffer length when reading PNG chunks
iamcarbon e6d86bd
Ensure the BufferReader can't advance past the end of data
iamcarbon f4437f5
Improve code readability in BplistReader
iamcarbon 59f4294
Fix length check in PngMetadataReader
iamcarbon 509973c
Fix typo
drewnoakes a332d84
Revert change in 4CC strings
drewnoakes 7173e0a
Make field readonly
drewnoakes b983a8f
Make property readonly
drewnoakes 6c398fd
Change Advance to return a span
drewnoakes 1b38f68
Merge remote-tracking branch 'origin/main' into cq4
drewnoakes 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
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
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.