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

Feat: memory-efficient geodata decoder #319

Merged
merged 1 commit into from
May 4, 2021
Merged

Feat: memory-efficient geodata decoder #319

merged 1 commit into from
May 4, 2021

Conversation

Loyalsoldier
Copy link
Collaborator

This PR implements a simple decoder based on LEB128 used in protobuf. It reads geo files byte by byte to reduce peak memory usage.

If the decoder fails to decode the geo file, it will fallback to the original ReadFile method to keep backward compatibility.

About protobuf encoding and decoding, read https://developers.google.com/protocol-buffers/docs/encoding

@Loyalsoldier Loyalsoldier merged commit 5eb0878 into p4gefau1t:master May 4, 2021
@Loyalsoldier Loyalsoldier deleted the feat-geodata-decoder branch May 4, 2021 07:52
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

Successfully merging this pull request may close these issues.

None yet

1 participant