Last active
August 22, 2020 02:42
-
-
Save wireboy5/ae70a78a251252e67087397c7de6b8ab to your computer and use it in GitHub Desktop.
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
## Delta Encoding for bytes of the same size in a single line lambda function. No external or standard libraries required | |
deltaSameLength = lambda d1,d2: b''.join([bytes().fromhex(hex(b1^b2).replace("0x","").rjust(2,"0")) for b1,b2 in zip(d1,d2)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment