Skip to content

Python tool for converting files and office documents to Markdown.

increase chunk size from 512 bytes to 64 KB for HTTP response reading (#1511)

Yasir Alibrahem199fe8b185c3
diff --git a/packages/markitdown/src/markitdown/_markitdown.py b/packages/markitdown/src/markitdown/_markitdown.py
index 888d1e62..4f2fcbea 100644
--- a/packages/markitdown/src/markitdown/_markitdown.py
+++ b/packages/markitdown/src/markitdown/_markitdown.py
@@ -593,7 +593,7 @@ class MarkItDown:
# Read into BytesIO
buffer = io.BytesIO()
- for chunk in response.iter_content(chunk_size=512):
+ for chunk in response.iter_content(chunk_size=65536):
buffer.write(chunk)
buffer.seek(0)