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

Compression algorithm #171

Closed
obscuren opened this issue Oct 31, 2014 · 2 comments
Closed

Compression algorithm #171

obscuren opened this issue Oct 31, 2014 · 2 comments

Comments

@obscuren
Copy link
Contributor

Simple RLE with magic numbers sha3('') and sha3('\x80'):

let magic = '\xfe'

Alternatives: '\xff', '\x00ff'

Compression

'\x00' * n where n >= 2, n <= 254 -> magic.chr(n - 2)
sha3('') -> magic.'\xfd'
sha3('\x80') -> magic.'\xfe'
magic -> magic.'\xff'
@obscuren obscuren added this to the PoC8 milestone Oct 31, 2014
@obscuren obscuren changed the title P2P Compression Compression algorithm Nov 2, 2014
@obscuren obscuren removed this from the PoC8 milestone Nov 2, 2014
@obscuren
Copy link
Contributor Author

obscuren commented Nov 2, 2014

import "github.com/ethereum/go-ethereum/compression/rle"

in := make([]byte, 5)
in = append(in, crypto.Sha3([]byte(""))...)
in = append(in, crypto.Sha3([]byte{0x80})...)
in = append(in, token)

c := rle.Compress(in)
d = rle.Decompress(c)

bytes.Compare(in, d) == 0

@obscuren
Copy link
Contributor Author

obscuren commented Nov 2, 2014

Should be applied to the io p2p stream #172

tailingchen added a commit to tailingchen/go-ethereum that referenced this issue Jul 3, 2018
core/state: save dirty storage in block level
maoueh pushed a commit to streamingfast/go-ethereum that referenced this issue Aug 13, 2021
tony-ricciardi pushed a commit to tony-ricciardi/go-ethereum that referenced this issue Jan 20, 2022
weiihann pushed a commit to weiihann/go-ethereum that referenced this issue Feb 23, 2023
Delete genesis-keystore

Co-authored-by: HAOYUatHZ <[email protected]>
atenjin pushed a commit to alt-research/go-ethereum that referenced this issue Apr 4, 2024
* Enable Canyon via the superchain registry

* Rename PostCanyon to Canyon
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

1 participant