mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-08-03 18:26:11 -04:00

Binary content do not need to be modified, so we don't need to copy it. We can directly serve it from the internal zim (cluster) buffer. The handle_content function now getArticleObjectByDecodedUrl instead of getContentByDecodedUrl. This is to get the mimetype of the article and copy the content only when needed (getContentByDecodedUrl always copy the content). Thus, handle_content is a bit more complex as it need to do some manipulation previously made in getContentByDecodedUrl. The main change is that if the content is binary, we serve the content with a callback response who will get the content chunks directly from the blob buffer.
Description
Languages
C++
76.1%
JavaScript
16.9%
CSS
2.1%
HTML
2%
Python
1.7%
Other
1.1%