Answer the question
In order to leave comments, you need to log in
Is it possible to encode a string to reduce its weight?
Good afternoon, I have a line of such a plan
`GO_TO_METER_BY_ADDRESS [москва, ул. Свердлова 43]`
Answer the question
In order to leave comments, you need to log in
1. GO_TO_METER_BY_ADDRESS must be a number
2. The text part (if not in English) can be wrapped in koi8-r
There are a lot of compression algorithms. Look up arithmetic coding and Huffman. Very long lines still won’t fit, of course, but it’s realistic to achieve 30 percent
agree with the back and use their api for the city and streets ... because the length will be variable, and the address can also contain not only a street, but also an alley, an avenue, it can also not necessarily be written in abbreviation, and even if you add a body type prefix to the number ... Therefore, you should think about using a single api for requests for backing, in order to send not names, but their codes ...
Reducing to the fact that the user would not enter data, but choose from the list provided, this is how many taxis, deliveries do ...
https://facebook.github.io/zstd/ - Zstandard is a real-time compression algorithm
There are implementations for different languages (I see Javascript (emscripten) Yoshihito + node.js)
There is a special mode in this algorithm (with preliminary compilation of a dictionary) , which compresses short strings of the same type well.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question