MCPcopy Create free account
hub / github.com/apache/fory / decodeLowerUpperDigitSpecialChar

Method decodeLowerUpperDigitSpecialChar

go/fory/meta/meta_string_decoder.go:154–169  ·  view source on GitHub ↗

** Decoding char for LOWER_UPPER_DIGIT_SPECIAL Encoding Algorithm. */

(charValue byte)

Source from the content-addressed store, hash-verified

152
153/** Decoding char for LOWER_UPPER_DIGIT_SPECIAL Encoding Algorithm. */
154func (d *Decoder) decodeLowerUpperDigitSpecialChar(charValue byte) (val byte, err error) {
155 if charValue <= 25 {
156 val = 'a' + charValue
157 } else if charValue >= 26 && charValue <= 51 {
158 val = 'A' + (charValue - 26)
159 } else if charValue >= 52 && charValue <= 61 {
160 val = '0' + (charValue - 52)
161 } else if charValue == 62 {
162 val = d.specialChar1
163 } else if charValue == 63 {
164 val = d.specialChar2
165 } else {
166 err = fmt.Errorf("invalid character value for LOWER_UPPER_DIGIT_SPECIAL: %v", charValue)
167 }
168 return
169}

Callers 1

decodeCharMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected