airlift / aircompressor

A port of Snappy, LZO, LZ4, and Zstandard to Java
Apache License 2.0
549 stars 110 forks source link

Add Util.readResource() #181

Open dlazerka opened 6 months ago

dlazerka commented 6 months ago

Makes code cleaner and reduces dependency on a third-party library. (Some IDEs mark the Resources.toByteArray() as a warning, because it's annotated @Beta).

Also makes it a little easier to later write code that reads data files as ByteBuffers. I know it's not on the radar (#146, #179), but I'd like to implement it anyway (in a separate package perhaps, or maybe suffixing all the classes with Bb).