DataFormat.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. 
  2. namespace ProtoBuf
  3. {
  4. /// <summary>
  5. /// Sub-format to use when serializing/deserializing data
  6. /// </summary>
  7. public enum DataFormat
  8. {
  9. /// <summary>
  10. /// Uses the default encoding for the data-type.
  11. /// </summary>
  12. Default,
  13. /// <summary>
  14. /// When applied to signed integer-based data (including Decimal), this
  15. /// indicates that zigzag variant encoding will be used. This means that values
  16. /// with small magnitude (regardless of sign) take a small amount
  17. /// of space to encode.
  18. /// </summary>
  19. ZigZag,
  20. /// <summary>
  21. /// When applied to signed integer-based data (including Decimal), this
  22. /// indicates that two's-complement variant encoding will be used.
  23. /// This means that any -ve number will take 10 bytes (even for 32-bit),
  24. /// so should only be used for compatibility.
  25. /// </summary>
  26. TwosComplement,
  27. /// <summary>
  28. /// When applied to signed integer-based data (including Decimal), this
  29. /// indicates that a fixed amount of space will be used.
  30. /// </summary>
  31. FixedSize,
  32. /// <summary>
  33. /// When applied to a sub-message, indicates that the value should be treated
  34. /// as group-delimited.
  35. /// </summary>
  36. Group
  37. }
  38. }