mySobek Home   |   Help
Skip Navigation Links.
Expand <a href='https://sobekrepository.org/sobekcm' title='Sobek home page'>Project Home</a>Project Home
Expand <a href='https://sobekrepository.org/help' title='Online user help'>User Help</a>User Help
Expand <a href='https://sobekrepository.org/sobekcm/technical' title='Sobek home page'>Technical Help</a>Technical Help
Expand <a href='https://sobekrepository.org/software' title='Center for downloading all SobekCM-related software'>Download Center</a>Download Center
Training Videos
Collapse <a href='https://sobekrepository.org/codehelp' title='Details on each of the different classes, interfaces, properties, etc..'>Code Details</a>Code Details
Expand <a href='https://sobekrepository.org/codehelp/engineagnosticlayerdbaccess' title='EngineAgnosticLayerDbAccess'>EngineAgnosticLayerDbAccess Namespace</a>EngineAgnosticLayerDbAccess Namespace
Expand <a href='https://sobekrepository.org/codehelp/builder_library' title='SobekCM.Builder_Library'>Builder_Library Namespace</a>Builder_Library Namespace
Collapse <a href='https://sobekrepository.org/codehelp/core' title='SobekCM.Core'>Core Namespace</a>Core Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/aggregations' title='SobekCM.Core.Aggregations'>Aggregations Sub-Namespace</a>Aggregations Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/applicationstate' title='SobekCM.Core.ApplicationState'>ApplicationState Sub-Namespace</a>ApplicationState Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/briefitem' title='SobekCM.Core.BriefItem'>BriefItem Sub-Namespace</a>BriefItem Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/builder' title='SobekCM.Core.Builder'>Builder Sub-Namespace</a>Builder Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/client' title='SobekCM.Core.Client'>Client Sub-Namespace</a>Client Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/configuration' title='SobekCM.Core.Configuration'>Configuration Sub-Namespace</a>Configuration Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/ead' title='SobekCM.Core.EAD'>EAD Sub-Namespace</a>EAD Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/filesystems' title='SobekCM.Core.FileSystems'>FileSystems Sub-Namespace</a>FileSystems Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/items' title='SobekCM.Core.Items'>Items Sub-Namespace</a>Items Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/marc' title='SobekCM.Core.MARC'>MARC Sub-Namespace</a>MARC Sub-Namespace
Collapse <a href='https://sobekrepository.org/codehelp/core/memorymgmt' title='SobekCM.Core.MemoryMgmt'>MemoryMgmt Sub-Namespace</a>MemoryMgmt Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/message' title='SobekCM.Core.Message'>Message Sub-Namespace</a>Message Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/microservicesclient' title='SobekCM.Core.MicroservicesClient'>MicroservicesClient Sub-Namespace</a>MicroservicesClient Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/navigation' title='SobekCM.Core.Navigation'>Navigation Sub-Namespace</a>Navigation Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/oai' title='SobekCM.Core.OAI'>OAI Sub-Namespace</a>OAI Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/resulttitle' title='SobekCM.Core.ResultTitle'>ResultTitle Sub-Namespace</a>ResultTitle Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/results' title='SobekCM.Core.Results'>Results Sub-Namespace</a>Results Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/search' title='SobekCM.Core.Search'>Search Sub-Namespace</a>Search Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/serialization' title='SobekCM.Core.Serialization'>Serialization Sub-Namespace</a>Serialization Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/settings' title='SobekCM.Core.Settings'>Settings Sub-Namespace</a>Settings Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/sitemap' title='SobekCM.Core.SiteMap'>SiteMap Sub-Namespace</a>SiteMap Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/skins' title='SobekCM.Core.Skins'>Skins Sub-Namespace</a>Skins Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/ui_configuration' title='SobekCM.Core.UI_Configuration'>UI_Configuration Sub-Namespace</a>UI_Configuration Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/users' title='SobekCM.Core.Users'>Users Sub-Namespace</a>Users Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/webcontent' title='SobekCM.Core.WebContent'>WebContent Sub-Namespace</a>WebContent Sub-Namespace
Expand <a href='https://sobekrepository.org/codehelp/core/emailinfo' title='EmailInfo Class'>EmailInfo</a>EmailInfo
Expand <a href='https://sobekrepository.org/codehelp/core/iserializationevents' title='iSerializationEvents Interface'>iSerializationEvents Interface</a>iSerializationEvents Interface
Expand <a href='https://sobekrepository.org/codehelp/core/milestone_entry' title='Milestone_Entry Class'>Milestone_Entry</a>Milestone_Entry
Expand <a href='https://sobekrepository.org/codehelp/engine_library' title='SobekCM.Engine_Library'>Engine_Library Namespace</a>Engine_Library Namespace
Expand <a href='https://sobekrepository.org/codehelp/library' title='SobekCM.Library'>Library Namespace</a>Library Namespace
Expand <a href='https://sobekrepository.org/codehelp/resource_object' title='SobekCM.Resource_Object'>Resource_Object Namespace</a>Resource_Object Namespace
Expand <a href='https://sobekrepository.org/codehelp/tools' title='SobekCM.Tools'>Tools Namespace</a>Tools Namespace
MISSING BANNER

SerializationWriter.WriteOptimized Method (String)



Writes a string value into the stream using the fewest number of bytes possible. Stored Size: 1 byte upwards depending on string length Notes: Encodes null, Empty, 'Y', 'N', ' ' values as a single byte Any other single char string is stored as two bytes All other strings are stored in a string token list: The TypeCode representing the current string token list is written first (1 byte), followed by the string token itself (1-4 bytes) When the current string list has reached 128 values then a new string list is generated and that is used for generating future string tokens. This continues until the maximum number (128) of string lists is in use, after which the string lists are used in a round-robin fashion. By doing this, more lists are created with fewer items which allows a smaller token size to be used for more strings. The first 16,384 strings will use a 1 byte token. The next 2,097,152 strings will use a 2 byte token. (This should suffice for most uses!) The next 268,435,456 strings will use a 3 byte token. (My, that is a lot!!) The next 34,359,738,368 strings will use a 4 byte token. (only shown for completeness!!!)


Namespace: SobekCM.Core.MemoryMgmt
Assembly: SobekCM_Core (in SobekCM_Core.dll) Version: 4.10.0.0 (4.10.0.0)

Syntax

C#
public void WriteOptimized(
	string value
)

Parameters

value
Type: System..::..String
The string to store.

See Also



Version 4.10.0 ( last generated Monday, March 7, 2016 )