Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
generated fromrefcell/femplate

Pack data tightly together and save space.

License

NotificationsYou must be signed in to change notification settings

exp-table/hyena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyena •testslicensesolidity

A data packing library.

What is Hyena?

Hyena is a library that is an alternative toabi.encode andabi.encodePacked that can result in smallerbytes.

ItWON'T beatabi.encode orabi.encodePacked in terms of gas consumption but will in the size of the output. A reduction of up to 50% can be obtained.

It serves as educational material.

Warning

Due to how the internal "map" works, you can only pack 41 32-bytes values.

It should be noted that unpacking the payload produces an array whose elements order is in reverse w.r.t the elements that were added.

Installation

To install withFoundry:

forge install exp-table/hyena

Usage

bytesmemorypayload=Hyena.init();payload=Hyena.crush(payload,uint(100));payload=Hyena.crush(payload,uint(2**256-1));uint256[]memoryoutputs=Hyena.digest(payload);

Notable Mentions

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.

SeeLICENSE for more details.

About

Pack data tightly together and save space.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp