mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-09-22 11:45:45 -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.2%
JavaScript
16.9%
CSS
2.1%
HTML
1.9%
Python
1.6%
Other
1.2%