Compare commits

..

2 Commits

Author SHA1 Message Date
Charles Iliya Krempeaux ebd57f680a initial commits 2023-10-28 13:23:04 -07:00
Charles Iliya Krempeaux 62fbc41717 initial commits 2023-10-28 13:22:58 -07:00
2 changed files with 2591 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package hexadecabytes
import (
"sourcecode.social/reiver/go-hexadeca/symbols/byte"
)
// EncodeInt8 encodes the value of a int8 into hexadecimal.
func EncodeInt8(value int8, symbolFunc func(byte)byte) (mostSignificant byte, leastSignificant byte) {
mostSignificant = symbolFunc( byte(0x0f & (value >> 4)) )
leastSignificant = symbolFunc( byte(0x0f & (value )) )
return
}
func EncodeInt8UsingLowerCaseSymbols(value int8) (mostSignificant byte, leastSignificant byte) {
return EncodeInt8(value, bytesymbols.LowerCase)
}
func EncodeInt8UsingUpperCaseSymbols(value int8) (mostSignificant byte, leastSignificant byte) {
return EncodeInt8(value, bytesymbols.UpperCase)
}

File diff suppressed because it is too large Load Diff