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

引入zlib对字节码进行压缩 #2

Open
bobcao3 opened this issue May 13, 2018 · 3 comments
Open

引入zlib对字节码进行压缩 #2

bobcao3 opened this issue May 13, 2018 · 3 comments

Comments

@bobcao3
Copy link
Member

bobcao3 commented May 13, 2018

如你所见我们的定长指令集会在程序里堆一顿的0x0000
如果上了zlib,对于大一些的字节码些许可以被压缩掉很多

@satgo1546
Copy link
Member

emmmmm 这样就又开始有依赖了
在Windoge上不管引用什么外部库都是个麻烦的事情
如果考虑把zlib的代码直接复制进这个项目的话说不定还好(

@bobcao3
Copy link
Member Author

bobcao3 commented May 14, 2018

这是一个问题,zlib太大了…… 虽然现在我们的汇编器也不需要进行对齐了,我们甚至可以把指令集改成变长的

@satgo1546
Copy link
Member

其实改成变长还是会有一堆0字节的,因为许多立即数都非常小,然后存的时候就会存成xx 00 00 00。
Anyway,我觉得改成变长的字节码是个好主意。至少寄存器号码可以立刻节省3个字节。
除掉zlib的话,其实还有一些压缩库是很小的,比如miniLZO,然而是GPL

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

2 participants