Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.6 KB
Raw Blame

PDF exports check image structure before opening the images: GIF and JPEG headers, the Exif metadata the image decoder loads from JPEG, PNG and WebP images when the renderer opens and orients them (a PNG's eXIf chunk and its tEXt chunk keyed "exif" included), the number of chunks in PNG and WebP images, the bytes a PNG's compressed profile and text chunks (iCCP, zTXt, compressed iTXt) decompress to, and the number of frame headers and scans in a JPEG. Resources above the format-specific structure, metadata, chunk-count, decompression and scan-count limits are omitted while the export continues. A PNG's compressed chunks are decompressed in bounded steps and charged as they go against a 4 MiB cap for the whole image, including what a chunk decompresses to before its data turns out to be corrupt (a step the decompressor rejects is charged the most it could have produced); the check stops one byte past the cap, and each later open of an accepted PNG by the image decoder decompresses no more than the cap. A PNG whose zTXt or iTXt text chunk is keyed "exif" is refused outright rather than trusting what the Exif reader makes of decoded text. A GIF whose block structure cannot be walked to the end of its first frame (cut short, holding an unknown block, or ending before any image) is omitted, even where the image decoder would still open it. JPEG images are measured by the area the decoder processes, padded to whole decoding blocks (MCUs), both against the per-image pixel limit and against the per-export pixel budget, and a JPEG with more than 10 scans is charged against that budget in proportion to its scans.