You must transfer a large string from the client to the server. I want it to be compressed on the client using javascript and decompressed on the server using django / python. Tell me, please, how this can be implemented. What archiving algorithm is there and there?

  • On the Internet there are lzw compression algorithms. It is not strong, but fast. We must not forget that the html is a text format, and with complex algorithms, base64 will have to be used that will make the data heavier. - nick_n_a
  • Maybe you can search the gzip library for compressing the page. Many browsers support gzip pages. - nick_n_a
  • lzw is not ready for python3 - LOGA
  • why base64? I copy dom in text form, as a string, and I want to transfer it to a third-party server so that I can parse it and take what I need - LOGA
  • Because if you want to implement compression "manually", then problems may arise if the compressed information contains such characters that the browser does not understand or service. - nick_n_a

0