-
Notifications
You must be signed in to change notification settings - Fork 167
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
Spanify (3/n) #367
Spanify (3/n) #367
Conversation
iamcarbon
commented
Jan 21, 2024
- Updates mutable byte[] data in HuffmanTablesDirectory with statistically initialized data
- Adds and utilizes JpegSegment.Span property to reduce need for AsSpan()
- Uses static JpegSegmentPreambleBytes in DuckyReader
@drewnoakes Ready for review / feedback. CI is failing due to an ambiguous xunit method call (resolved in #366) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other PR has merged so it should be possible to get the checks here to pass now.
Left some comments for potential future work too. We can file issues to track them if we feel they're valid.
|
||
ICollection<JpegSegmentType> IJpegSegmentMetadataReader.SegmentTypes { get; } = new[] { JpegSegmentType.AppC }; | ||
ICollection<JpegSegmentType> IJpegSegmentMetadataReader.SegmentTypes { get; } = [JpegSegmentType.AppC]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should bump these to IReadOnlyCollection. Can be a future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annoyingly, HashSet doesn't implement IReadOnlyCollection, which we use in JpegReader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at usages of the property, they're all enumerations. So IReadOnlyCollection
or IEnumerable
are both candidates, and JpegReader
would be changed to no longer use HashSet<T>
.