From 4a9002165a7d070fc146b9266c0258a194f0ad37 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Sat, 28 Oct 2023 16:25:43 -0700 Subject: [PATCH] initial commits --- README.md | 282 ------------------------------------------------------ 1 file changed, 282 deletions(-) diff --git a/README.md b/README.md index 12cf9b9..9f32098 100644 --- a/README.md +++ b/README.md @@ -110,288 +110,6 @@ Samples: * `𝍬𝍠𝍭𝍮` * `𝍤𝍫𝍡𝍭` -## hexadecimal encode `byte` - -To hexadecimal encode a `byte` use any of these: - -```go -import "sourcecode.social/reiver/go-hexadeca/enc/bytes" - -// ... - -// value==254 -> mostSignificant=='f', leastSignificant=='e' -mostSignificant, leastSignificant := hexadecabytes.EncodeByteUsingLowerCaseSymbols(value) - -// ... - -// value==254 -> mostSignificant=='F', leastSignificant=='E' -mostSignificant, leastSignificant := hexadecabytes.EncodeByteUsingUpperCaseSymbols(value) - -``` - -Or: - -```go -import "sourcecode.social/reiver/go-hexadeca/enc/runes" - -// ... - -// value==254 -> mostSignificant=='f', leastSignificant=='e' -mostSignificant, leastSignificant := hexadecarunes.EncodeByteUsingLowerCaseSymbols(value) - -// ... - -// value==254 -> mostSignificant=='F', leastSignificant=='E' -mostSignificant, leastSignificant := hexadecarunes.EncodeByteUsingUpperCaseSymbols(value) - -``` - -Or: - -```go -import ( - "sourcecode.social/reiver/go-hexadeca/enc/bytes" - "sourcecode.social/reiver/go-hexadeca/symbols/byte" -) - -// ... - -// value==254 -> mostSignificant=='f', leastSignificant=='e' -mostSignificant, leastSignificant := hexadecabytes.EncodeByte(value, bytesymbols.LowerCase) - -// ... - -// value==254 -> mostSignificant=='F', leastSignificant=='E' -mostSignificant, leastSignificant := hexadecabytes.EncodeByte(value, bytesymbols.UpperCase) -``` - -Or: - -```go -import ( - "sourcecode.social/reiver/go-hexadeca/enc/runes" - "sourcecode.social/reiver/go-hexadeca/symbols/rune" -) - -// ... - -// value==254 -> mostSignificant=='f', leastSignificant=='e' -mostSignificant, leastSignificant := hexadecarunes.EncodeByte(value, runesymbols.LowerCase) - -// ... - -// value==254 -> mostSignificant=='F', leastSignificant=='E' -mostSignificant, leastSignificant := hexadecarunes.EncodeByte(value, runesymbols.UpperCase) -``` - -## hexadecimal encode `uint16` - -To hexadecimal encode a `uint16` use any of these: - -```go -import "sourcecode.social/reiver/go-hexadeca/enc/bytes" - -// ... - -r3, r2, r1, r0 := hexadecabytes.EncodeUint16UsingLowerCaseSymbols(value) - -// ... - -r3, r2, r1, r0 := hexadecabytes.EncodeUint16UsingUpperCaseSymbols(value) - -``` - -Or: - -```go -import "sourcecode.social/reiver/go-hexadeca/enc/runes" - -// ... - -r3, r2, r1, r0 := hexadecarunes.EncodeUint16UsingLowerCaseSymbols(value) - -// ... - -r3, r2, r1, r0 := hexadecarunes.EncodeUint16UsingUpperCaseSymbols(value) - -``` - -Or: - -```go -import ( - "sourcecode.social/reiver/go-hexadeca/enc/bytes" - "sourcecode.social/reiver/go-hexadeca/symbols/byte" -) - -// ... - -r3, r2, r1, r0 := hexadecabytes.EncodeUint16(value, bytesymbols.LowerCase) - -// ... - -r3, r2, r1, r0 := hexadecabytes.EncodeUint16(value, bytesymbols.UpperCase) -``` - -Or: - -```go -import ( - "sourcecode.social/reiver/go-hexadeca/enc/bytes" - "sourcecode.social/reiver/go-hexadeca/symbols/rune" -) - -// ... - -r3, r2, r1, r0 := hexadecabytes.EncodeUint16(value, runesymbols.LowerCase) - -// ... - -r3, r2, r1, r0 := hexadecabytes.EncodeUint16(value, runesymbols.UpperCase) -``` - -## hexadecimal encode `uint32` - -To hexadecimal encode a `uint32` use any of these: - -```go -import "sourcecode.social/reiver/go-hexadeca/enc/bytes" - -// ... - -r7, r6, r5, r4, r3, r2, r1, r0 := hexadecabytes.EncodeUint32UsingLowerCaseSymbols(value) - -// ... - -r7, r6, r5, r4, r3, r2, r1, r0 := hexadecabytes.EncodeUint32UsingUpperCaseSymbols(value) - -``` - -Or: - -```go -import "sourcecode.social/reiver/go-hexadeca/enc/runes" - -// ... - -r7, r6, r5, r4, r3, r2, r1, r0 := hexadecarunes.EncodeUint32UsingLowerCaseSymbols(value) - -// ... - -r7, r6, r5, r4, r3, r2, r1, r0 := hexadecarunes.EncodeUint32UsingUpperCaseSymbols(value) - -``` - -Or: - -```go -import ( - "sourcecode.social/reiver/go-hexadeca/enc/bytes" - "sourcecode.social/reiver/go-hexadeca/symbols/byte" -) - -// ... - -r7, r6, r5, r4, r3, r2, r1, r0 := hexadecabytes.EncodeUint32(value, bytesymbols.LowerCase) - -// ... - -r7, r6, r5, r4, r3, r2, r1, r0 := hexadecabytes.EncodeUint32(value, bytesymbols.UpperCase) -``` - -Or: - -```go -import ( - "sourcecode.social/reiver/go-hexadeca/enc/runes" - "sourcecode.social/reiver/go-hexadeca/symbols/rune" -) - -// ... - -r7, r6, r5, r4, r3, r2, r1, r0 := hexadecarunes.EncodeUint32(value, runesymbols.LowerCase) - -// ... - -r7, r6, r5, r4, r3, r2, r1, r0 := hexadecarunes.EncodeUint32(value, runesymbols.UpperCase) -``` - -## hexadecimal encode `uint64` - -To hexadecimal encode a `uint64` use any of these: - -```go -import "sourcecode.social/reiver/go-hexadeca" - -// ... - -// value==18364758544493064720 -> r15=='f', r14=='e', r13=='d', r12=='c', r11=='b', r10=='a', r9=='9', r8=='8', r7=='7', r6=='6', r5=='5', r4=='4', r3=='3', r2=='2', r1=='1', r0=='0' -r15, r14, r13, r12, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0 := hexadeca.EncodeUint64UsingLowerCaseSymbols(value) - -// ... - -// value==18364758544493064720 -> r15=='F', r14=='E', r13=='D', r12=='C', r11=='B', r10=='A', r9=='9', r8=='8', r7=='7', r6=='6', r5=='5', r4=='4', r3=='3', r2=='2', r1=='1', r0=='0' -r15, r14, r13, r12, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0 := hexadeca.EncodeUint64UsingUpperCaseSymbols(value) - -``` - -Or: - -```go -import ( - "sourcecode.social/reiver/go-hexadeca" - "sourcecode.social/reiver/go-hexadeca/symbols/rune" -) - -// ... - -// value==18364758544493064720 -> r15=='f', r14=='e', r13=='d', r12=='c', r11=='b', r10=='a', r9=='9', r8=='8', r7=='7', r6=='6', r5=='5', r4=='4', r3=='3', r2=='2', r1=='1', r0=='0' -r15, r14, r13, r12, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0 := hexadeca.EncodeUint64(value, runesymbols.LowerCase) - -// ... - -// value==18364758544493064720 -> r15=='F', r14=='E', r13=='D', r12=='C', r11=='B', r10=='A', r9=='9', r8=='8', r7=='7', r6=='6', r5=='5', r4=='4', r3=='3', r2=='2', r1=='1', r0=='0' -r15, r14, r13, r12, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0 := hexadeca.EncodeUint64(value, runesymbols.UpperCase) -``` - -## hexadecimal encode `int64` - -To hexadecimal encode a `int64` use any of these: - -```go -import "sourcecode.social/reiver/go-hexadeca" - -// ... - -// value==18364758544493064720 -> r15=='f', r14=='e', r13=='d', r12=='c', r11=='b', r10=='a', r9=='9', r8=='8', r7=='7', r6=='6', r5=='5', r4=='4', r3=='3', r2=='2', r1=='1', r0=='0' -r15, r14, r13, r12, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0 := hexadeca.EncodeInt64UsingLowerCaseSymbols(value) - -// ... - -// value==18364758544493064720 -> r15=='F', r14=='E', r13=='D', r12=='C', r11=='B', r10=='A', r9=='9', r8=='8', r7=='7', r6=='6', r5=='5', r4=='4', r3=='3', r2=='2', r1=='1', r0=='0' -r15, r14, r13, r12, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0 := hexadeca.EncodeInt64UsingUpperCaseSymbols(value) - -``` - -Or: - -```go -import ( - "sourcecode.social/reiver/go-hexadeca" - "sourcecode.social/reiver/go-hexadeca/symbols/rune" -) - -// ... - -// value==18364758544493064720 -> r15=='f', r14=='e', r13=='d', r12=='c', r11=='b', r10=='a', r9=='9', r8=='8', r7=='7', r6=='6', r5=='5', r4=='4', r3=='3', r2=='2', r1=='1', r0=='0' -r15, r14, r13, r12, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0 := hexadeca.EncodeInt64(value, runesymbols.LowerCase) - -// ... - -// value==18364758544493064720 -> r15=='F', r14=='E', r13=='D', r12=='C', r11=='B', r10=='A', r9=='9', r8=='8', r7=='7', r6=='6', r5=='5', r4=='4', r3=='3', r2=='2', r1=='1', r0=='0' -r15, r14, r13, r12, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0 := hexadeca.EncodeInt64(value, runesymbols.UpperCase) -``` - ## Import To import package **hexadeca** use `import` code like the following: