Created
May 18, 2020 16:23
-
-
Save zenparsing/9cad96080e41d427ec40cb27cec9c7fb to your computer and use it in GitHub Desktop.
Hex to sorted raw encoding in Ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hex_values = ['626f6f74', '72616365', '626c6168', '6f6f7073'] | |
packed_list = hex_values.map { |item| [item].pack('H*') }.sort().join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment