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

why dicomParser does not have pako as dependency #270

Open
sedghi opened this issue Jun 13, 2024 · 4 comments
Open

why dicomParser does not have pako as dependency #270

sedghi opened this issue Jun 13, 2024 · 4 comments

Comments

@sedghi
Copy link
Member

sedghi commented Jun 13, 2024

I'm trying to build an ES module for dicom-image-loader and encountering several issues. It seems like dicom-parser attempts to check if pako is defined or not, and then decides whether to use it. My question is, why not simply depend on pako directly? Currently, dicom-parser has zero dependencies and only dev dependencies.

@yagni

@yagni
Copy link
Collaborator

yagni commented Jun 13, 2024

This is a little before my time (way back in 2015), but my guess would be so that users who don't need inflation don't have to take the hit of the extra bytes from bundling pako. It's also not needed for running in node.js, which has the native zlib library, and there's no separate build pipeline at the moment for browser vs. node. @chafey would know for sure

@chafey
Copy link
Collaborator

chafey commented Jun 14, 2024 via email

@sedghi
Copy link
Member Author

sedghi commented Jun 14, 2024

I understand, but I'm encountering issues with ESM for the DICOM image loader, and assuming a library is available on the window object is an anti-pattern, in my opinion. At the very least, it should be injected during initialization or a similar process.

@chafey
Copy link
Collaborator

chafey commented Jun 14, 2024 via email

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

No branches or pull requests

3 participants