-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add zx7 compression utility #96
base: master
Are you sure you want to change the base?
Conversation
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#if !TARGET_PRIZM |
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.
If this isn't built for the calculator, why not simply omit this file from a build for the calculator? Same for the other files that wrap everything in one of these.
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 idea is that these can be used by offline tools - e.g. winsim, the CLI tool, or other external tool.
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.
In that case they should be built into some other target (that doesn't even need to exist right now, because there aren't any users). The cross-compiled library that we emit should really only be built from dzx7.c, since that's the only functionality that's meant to be available on the target.
#--------------------------------------------------------------------------------- | ||
# main targets | ||
#--------------------------------------------------------------------------------- | ||
$(OUTPUT).a: $(OFILES) |
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.
Is this the only product of this utility? I'd really like it to be more integrated, since right now it's just a library that the user can link which can just as easily be vendored into their own program- there's no reason for it to live here.
I'd consider the ability for a user to select resources to compress (automatically building and running the compressor as needed) and then linking the decompressor into a program to be much more useful than simply spitting out a library archive.
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.
Sure!
I've built a tool (in utils/zx7/CLI) which can compress and decompress files with zx7.
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.
That's a start, but doesn't address the concept of having actual integration with the tools. Right now there's really no reason to offer this library with the toolchain versus encouraging users to include the decompressor in their project, because this doesn't solve any of the hard problems involved in packaging compressed resources into a binary.
What I really want this to be able to do is for the user to load some rules we provide, and then the library handles compressing specified resource files, embedding the data in the output binary, and possibly generating a header file describing the compressed resources.
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.
Ah, okay. I'll work on it, but it'll be a while.
I've built a tool (in utils/zx7/CLI) which can compress and decompress files with zx7, which I think solves the mentioned issues. |
This PR adds Einar Saukas's zx7 compression utility from tswilliamson's PrizmSDK.
As yet untested, though it should work given that it's pulled straight from the PrizmSDK.