Class AttachmentTextExtractionOptions
- Namespace
- MailFathom.Application.Emails.Extraction.Attachments
- Assembly
- MailFathom.Application.dll
Bounds what reading one attachment's text may consume, and which formats are offered to a parser at all.
public sealed class AttachmentTextExtractionOptions
- Inheritance
-
AttachmentTextExtractionOptions
- Inherited Members
Remarks
Every value here is a ceiling rather than a target, and each one exists because a sender chose the bytes. A document parser is the largest attack surface this system has: an archive with a small compressed size and an enormous declared one, an element tree nested until a walk runs out of stack, and a page that decodes into more text than a mailbox holds in a year are all ordinary shapes of a mail-borne attack rather than corner cases. Every value on it is set once and read-only afterwards, because the instance is registered as a singleton: a mutable one would let anything resolving it raise a ceiling at run time past the range a start validated, or widen the one value deciding which sender-composed formats reach a parser at all.
Exceeding any of them abandons the attachment and says which ceiling stopped it. Nothing is truncated into a partial answer, because a partial extract presented as an extract is indistinguishable from a document that really said only that much.
Fields
- DefaultMaxContainerParts
The parts a container may declare where a deployment declares no ceiling of its own.
- DefaultMaxDecompressedOctets
The octets a container may inflate to where a deployment declares no ceiling of its own.
- DefaultMaxDecompressionRatio
The inflation ratio one container part may reach where a deployment declares no ceiling of its own.
- DefaultMaxElementDepth
The depth an element tree may nest to where a deployment declares no ceiling of its own.
- DefaultMaxExtractedTextCharacters
The characters one attachment may contribute where a deployment declares no ceiling of its own.
- DefaultMaxInputOctets
The octets one attachment may hold where a deployment declares no ceiling of its own.
- DefaultTimeout
The time one extraction may take where a deployment declares no ceiling of its own.
Properties
- Formats
Gets the formats an attachment is offered to a parser for.
- MaxContainerParts
Gets the greatest number of parts a container format may hold.
- MaxDecompressedOctets
Gets the total octets a container format may decompress to.
- MaxDecompressionRatio
Gets the greatest ratio of decompressed to compressed octets one container part may reach.
- MaxElementDepth
Gets the greatest depth an element tree inside a container part may nest to.
- MaxExtractedTextCharacters
Gets the greatest number of characters one attachment may contribute.
- MaxInputOctets
Gets the greatest number of octets one attachment may hold before it is read at all.
- MaxPicturesPerDocument
Gets how many of the pictures inside one document are copied out for a model to read.
- Timeout
Gets the time one extraction may take before it is abandoned.