Skip to content
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

Merged
merged 6 commits into from
Jan 22, 2024
Merged

Spanify (3/n) #367

merged 6 commits into from
Jan 22, 2024

Conversation

iamcarbon
Copy link
Collaborator

  • 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

@iamcarbon
Copy link
Collaborator Author

@drewnoakes Ready for review / feedback. CI is failing due to an ambiguous xunit method call (resolved in #366)

Copy link
Owner

@drewnoakes drewnoakes left a 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];
Copy link
Owner

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.

Copy link
Collaborator Author

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.

Copy link
Owner

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>.

MetadataExtractor/Formats/Exif/ExifReader.cs Outdated Show resolved Hide resolved
@drewnoakes drewnoakes merged commit c8b36ab into drewnoakes:master Jan 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants