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

Fixed DataView 64 bit parsing #142

Merged
merged 4 commits into from
Apr 17, 2020
Merged

Fixed DataView 64 bit parsing #142

merged 4 commits into from
Apr 17, 2020

Conversation

ilan-gold
Copy link
Contributor

@ilan-gold ilan-gold commented Apr 9, 2020

I hadn't noticed this class since it is only used reading the firstIFDOffset which is always (in theory) 16 for BigTiff, but I ran into some mal-formatted data so I figure this should be fixed. I think we could also maybe just remove DataView64 all together and refactor to use DataSlice? Open to suggestions.

EDIT: I realized that this method is static and the class hasn't been instantiated yet. Still open to other fixes if you think of anything!

@ilan-gold ilan-gold marked this pull request as ready for review April 9, 2020 20:41
@ilan-gold
Copy link
Contributor Author

@constantinius Could you give this a review? This follows up a small bug on #132

@constantinius
Copy link
Member

I'd love to have at least some tests for this. Do you think you can add one for each case? (signed/unsigned, little/big endian)

@ilan-gold
Copy link
Contributor Author

@constantinius I updated both int64 algorithms. I think they both work now. I'm not sure what SLONG8 is for, but it should work now (it seemed to be the only thing using int64 operations).

@constantinius
Copy link
Member

Very nice, thanks a bunch! I'll have a detailed look and will merge then.

SLONG8 is the type name for signed long integer 8 bytes in size. So effectively int64.

@ilan-gold
Copy link
Contributor Author

Thanks a bunch!

@constantinius constantinius merged commit 5bec877 into geotiffjs:master Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants