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



Overload List

  NameDescription
Public methodWriteOptimized(array<Boolean>[]()[][])
Writes an optimized Boolean[] into the stream using the fewest possible bytes. Notes: A null or empty array will take 1 byte. Stored as a BitArray.
Public methodWriteOptimized(ArrayList)
Writes an non-null ArrayList into the stream using the fewest number of bytes possible. Stored Size: 1 byte upwards depending on data content Notes: An empty ArrayList takes 1 byte.
Public methodWriteOptimized(BitArray)
Writes a BitArray into the stream using the fewest number of bytes possible. Stored Size: 1 byte upwards depending on data content Notes: An empty BitArray takes 1 byte.
Public methodWriteOptimized(BitVector32)
Writes a BitVector32 into the stream using the fewest number of bytes possible. Stored Size: 1 to 4 bytes. (.Net is 4 bytes) 1 to 7 bits takes 1 byte 8 to 14 bits takes 2 bytes 15 to 21 bits takes 3 bytes 22 to 28 bits takes 4 bytes ------------------------------------------------------------------- 29 to 32 bits takes 5 bytes - use Write(BitVector32) method instead Try to order the BitVector32 masks so that the highest bits are least-likely to be set.
Public methodWriteOptimized(DateTime)
Writes a DateTime value into the stream using the fewest number of bytes possible. Stored Size: 3 bytes to 7 bytes (.Net is 8 bytes) Notes: A DateTime containing only a date takes 3 bytes (except a .NET 2.0 Date with a specified DateTimeKind which will take a minimum of 5 bytes - no further optimization for this situation felt necessary since it is unlikely that a DateTimeKind would be specified without hh:mm also) Date plus hh:mm takes 5 bytes. Date plus hh:mm:ss takes 6 bytes. Date plus hh:mm:ss.fff takes 7 bytes.
Public methodWriteOptimized(array<DateTime>[]()[][])
Writes a DateTime[] into the stream using the fewest possible bytes. Notes: A null or empty array will take 1 byte.
Public methodWriteOptimized(Decimal)
Writes a Decimal value into the stream using the fewest number of bytes possible. Stored Size: 1 byte to 14 bytes (.Net is 16 bytes) Restrictions: None
Public methodWriteOptimized(array<Decimal>[]()[][])
Writes a Decimal[] into the stream using the fewest possible bytes. Notes: A null or empty array will take 1 byte.
Public methodWriteOptimized(Int32)
Write an Int32 value using the fewest number of bytes possible.

Only call this method if the value is known to be between 0 and 268,435,455 otherwise use Write(Int32 value)
Public methodWriteOptimized(array<Int32>[]()[][])
Writes an Int32[] into the stream using the fewest possible bytes. Notes: A null or empty array will take 1 byte.
Public methodWriteOptimized(Int64)
Write an Int64 value using the fewest number of bytes possible. 0x0000000000000000 - 0x000000000000007f (0 to 127) takes 1 byte 0x0000000000000080 - 0x00000000000003FF (128 to 16,383) takes 2 bytes 0x0000000000000400 - 0x00000000001FFFFF (16,384 to 2,097,151) takes 3 bytes 0x0000000000200000 - 0x000000000FFFFFFF (2,097,152 to 268,435,455) takes 4 bytes 0x0000000010000000 - 0x00000007FFFFFFFF (268,435,456 to 34,359,738,367) takes 5 bytes 0x0000000800000000 - 0x000003FFFFFFFFFF (34,359,738,368 to 4,398,046,511,103) takes 6 bytes 0x0000040000000000 - 0x0001FFFFFFFFFFFF (4,398,046,511,104 to 562,949,953,421,311) takes 7 bytes 0x0002000000000000 - 0x00FFFFFFFFFFFFFF (562,949,953,421,312 to 72,057,594,037,927,935) takes 8 bytes ------------------------------------------------------------------ 0x0100000000000000 - 0x7FFFFFFFFFFFFFFF (72,057,594,037,927,936 to 9,223,372,036,854,775,807) takes 9 bytes 0x7FFFFFFFFFFFFFFF - 0xFFFFFFFFFFFFFFFF (9,223,372,036,854,775,807 and above) takes 10 bytes All negative numbers take 10 bytes Only call this method if the value is known to be between 0 and 72,057,594,037,927,935 otherwise use Write(Int64 value)
Public methodWriteOptimized(array<Int64>[]()[][])
Writes an Int64[] into the stream using the fewest possible bytes. Notes: A null or empty array will take 1 byte.
Public methodWriteOptimized(array<Object>[]()[][])
Writes a not-null object[] into the stream using the fewest number of bytes possible. Stored Size: 2 bytes upwards depending on data content Notes: An empty object[] takes 1 byte. The contents of the array will be stored optimized.
Public methodWriteOptimized(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!!!)
Public methodWriteOptimized(TimeSpan)
Writes a TimeSpan value into the stream using the fewest number of bytes possible. Stored Size: 2 bytes to 8 bytes (.Net is 8 bytes) Notes: hh:mm (time) are always stored together and take 2 bytes. If seconds are present then 3 bytes unless (time) is not present in which case 2 bytes since the seconds are stored in the minutes position. If milliseconds are present then 4 bytes. In addition, if days are present they will add 1 to 4 bytes to the above.
Public methodWriteOptimized(array<TimeSpan>[]()[][])
Writes a TimeSpan[] into the stream using the fewest possible bytes. Notes: A null or empty array will take 1 byte.
Public methodWriteOptimized(Type)
Stores a non-null Type object into the stream. Stored Size: Depends on the length of the Type's name. If the type is a System type (mscorlib) then it is stored without assembly name information, otherwise the Type's AssemblyQualifiedName is used.
Public methodWriteOptimized(UInt32)
Write a UInt32 value using the fewest number of bytes possible. 0x00000000 - 0x0000007f (0 to 127) takes 1 byte 0x00000080 - 0x000003FF (128 to 16,383) takes 2 bytes 0x00000400 - 0x001FFFFF (16,384 to 2,097,151) takes 3 bytes 0x00200000 - 0x0FFFFFFF (2,097,152 to 268,435,455) takes 4 bytes ---------------------------------------------------------------- 0x10000000 - 0xFFFFFFFF (268,435,456 and above) takes 5 bytes Only call this method if the value is known to be between 0 and 268,435,455 otherwise use Write(UInt32 value)
Public methodWriteOptimized(array<UInt32>[]()[][])
Writes a UInt32[] into the stream using the fewest possible bytes. Notes: A null or empty array will take 1 byte.
Public methodWriteOptimized(UInt64)
Write a UInt64 value using the fewest number of bytes possible. 0x0000000000000000 - 0x000000000000007f (0 to 127) takes 1 byte 0x0000000000000080 - 0x00000000000003FF (128 to 16,383) takes 2 bytes 0x0000000000000400 - 0x00000000001FFFFF (16,384 to 2,097,151) takes 3 bytes 0x0000000000200000 - 0x000000000FFFFFFF (2,097,152 to 268,435,455) takes 4 bytes 0x0000000010000000 - 0x00000007FFFFFFFF (268,435,456 to 34,359,738,367) takes 5 bytes 0x0000000800000000 - 0x000003FFFFFFFFFF (34,359,738,368 to 4,398,046,511,103) takes 6 bytes 0x0000040000000000 - 0x0001FFFFFFFFFFFF (4,398,046,511,104 to 562,949,953,421,311) takes 7 bytes 0x0002000000000000 - 0x00FFFFFFFFFFFFFF (562,949,953,421,312 to 72,057,594,037,927,935) takes 8 bytes ------------------------------------------------------------------ 0x0100000000000000 - 0x7FFFFFFFFFFFFFFF (72,057,594,037,927,936 to 9,223,372,036,854,775,807) takes 9 bytes 0x7FFFFFFFFFFFFFFF - 0xFFFFFFFFFFFFFFFF (9,223,372,036,854,775,807 and above) takes 10 bytes Only call this method if the value is known to be between 0 and 72,057,594,037,927,935 otherwise use Write(UInt64 value)
Public methodWriteOptimized(array<UInt64>[]()[][])
Writes a UInt64[] into the stream using the fewest possible bytes. Notes: A null or empty array will take 1 byte.
Public methodWriteOptimized(array<Object>[]()[][], array<Object>[]()[][])
Writes a pair of object[] arrays into the stream using the fewest number of bytes possible. The arrays must not be null and must have the same length The first array's values are written optimized The second array's values are compared against the first and, where identical, will be stored using a single byte. Useful for storing entity data where there is a before-change and after-change set of value pairs and, typically, only a few of the values will have changed.

See Also



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