SerializationWriterWriteOptimized Method (Int32) |
Write an Int32 value using the fewest number of bytes possible.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.10.0.0 (5.10.0)
Syntax public void WriteOptimized(
int value
)
Public Sub WriteOptimized (
value As Integer
)
Parameters
- value
- Type: SystemInt32
The Int32 to store. Must be between 0 and 268,435,455 inclusive.
Remarks
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 - 0x07FFFFFF (268,435,456 and above) takes 5 bytes
All negative numbers take 5 bytes
Only call this method if the value is known to be between 0 and
268,435,455 otherwise use Write(Int32 value)
See Also