options_gen.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // Code generated by "stringer -type=BlockSize,CompressionLevel -output options_gen.go"; DO NOT EDIT.
  2. package lz4
  3. import "strconv"
  4. func _() {
  5. // An "invalid array index" compiler error signifies that the constant values have changed.
  6. // Re-run the stringer command to generate them again.
  7. var x [1]struct{}
  8. _ = x[Block64Kb-65536]
  9. _ = x[Block256Kb-262144]
  10. _ = x[Block1Mb-1048576]
  11. _ = x[Block4Mb-4194304]
  12. }
  13. const (
  14. _BlockSize_name_0 = "Block64Kb"
  15. _BlockSize_name_1 = "Block256Kb"
  16. _BlockSize_name_2 = "Block1Mb"
  17. _BlockSize_name_3 = "Block4Mb"
  18. )
  19. func (i BlockSize) String() string {
  20. switch {
  21. case i == 65536:
  22. return _BlockSize_name_0
  23. case i == 262144:
  24. return _BlockSize_name_1
  25. case i == 1048576:
  26. return _BlockSize_name_2
  27. case i == 4194304:
  28. return _BlockSize_name_3
  29. default:
  30. return "BlockSize(" + strconv.FormatInt(int64(i), 10) + ")"
  31. }
  32. }
  33. func _() {
  34. // An "invalid array index" compiler error signifies that the constant values have changed.
  35. // Re-run the stringer command to generate them again.
  36. var x [1]struct{}
  37. _ = x[Fast-0]
  38. _ = x[Level1-512]
  39. _ = x[Level2-1024]
  40. _ = x[Level3-2048]
  41. _ = x[Level4-4096]
  42. _ = x[Level5-8192]
  43. _ = x[Level6-16384]
  44. _ = x[Level7-32768]
  45. _ = x[Level8-65536]
  46. _ = x[Level9-131072]
  47. }
  48. const (
  49. _CompressionLevel_name_0 = "Fast"
  50. _CompressionLevel_name_1 = "Level1"
  51. _CompressionLevel_name_2 = "Level2"
  52. _CompressionLevel_name_3 = "Level3"
  53. _CompressionLevel_name_4 = "Level4"
  54. _CompressionLevel_name_5 = "Level5"
  55. _CompressionLevel_name_6 = "Level6"
  56. _CompressionLevel_name_7 = "Level7"
  57. _CompressionLevel_name_8 = "Level8"
  58. _CompressionLevel_name_9 = "Level9"
  59. )
  60. func (i CompressionLevel) String() string {
  61. switch {
  62. case i == 0:
  63. return _CompressionLevel_name_0
  64. case i == 512:
  65. return _CompressionLevel_name_1
  66. case i == 1024:
  67. return _CompressionLevel_name_2
  68. case i == 2048:
  69. return _CompressionLevel_name_3
  70. case i == 4096:
  71. return _CompressionLevel_name_4
  72. case i == 8192:
  73. return _CompressionLevel_name_5
  74. case i == 16384:
  75. return _CompressionLevel_name_6
  76. case i == 32768:
  77. return _CompressionLevel_name_7
  78. case i == 65536:
  79. return _CompressionLevel_name_8
  80. case i == 131072:
  81. return _CompressionLevel_name_9
  82. default:
  83. return "CompressionLevel(" + strconv.FormatInt(int64(i), 10) + ")"
  84. }
  85. }