Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results for encoding
Search options questions only not deleted
2 votes
1 answer
4k views

Encoding on Dropdownlist items

I am currently doing Encoding on Dropdownlist in our project. Could you please review and provide your comments about the following approach? … list.Text = EncodeDropDownItem(list.Text); } } } //below are the methods to do encoding //encoding with antixss's htmlencode method private string EncodeDropDownItem(string DropdownText) { …
user4903's user avatar
1 vote
0 answers
854 views

Huffman encoding implementation

Here is my implementation of Huffman encoding using min-heap approach mentioned in this Wikipedia page. I'm looking for advice, using Python 2.7. … (root, prefix, result): if not root: return # left encode 0, right encode 1 if not root.left and not root.right: result[root.name] = prefix TreeNode.encode …
Lin Ma's user avatar
  • 3,453
7 votes
2 answers
417 views

Base64 encoding implementation

I am learning C and decided to make an implementation of Base64 encoding according to the info Wikipedia provides about it. …
Not M. Kalashnikov's user avatar
1 vote
2 answers
3k views

Delta encoding a list of numbers

.: 25626 25757 24367 24267 16 100 2 7277 Output a delta encoding for the sequence. In a delta encoding, the first element is reproduced as is. … } encoding.push(delta); } encoding.unshift(arr[0]); return encoding; } console.log(encode('25626'.split(' ')).join(' ')); console.log(encode('25626 25757 24367 24267 16 100 2 7277'.split …
CodeYogi's user avatar
  • 5,127
3 votes
2 answers
267 views

Huffman Encoding in Javascript

So, I've implemented Huffman Encoding in JavaScript, you can see it live here. … solid; } </style> </head> <body> Enter the string here:<br/> <input type="text" id="input" value="TEO SAMARZIJA"/> <button onclick="onButtonClick()">Encode
FlatAssembler's user avatar
11 votes
2 answers
2k views

Huffman encoding

As most encoding-methods, the words for often used symbols are shorter than the ones for not so commonly used symbols. The algorithm returns a binary code-word for every source symbol. … Like * most encoding methods, the words for often used symbols are shorter than * the ones for not so commonly used symbols. The result is a optimal prefix- * free code. …
user avatar
5 votes
3 answers
2k views

EncodingTranslatorStream - A stream object that translates character encoding

Specifies the input and output encoding. /// </summary> /// <param name="strInput">Input data, that will be decoded and re-encode into the specified output encoding</param> /// <param name= … //The process is to read bytes from an input stream, decode them, based on a specified encoding, //to chars which are unicode then encode them to bytes based on a specified encoding
Jeremy's user avatar
  • 293
2 votes
1 answer
2k views

Encoding and decoding exercise

I was issued the following coding challenge from a company to write an encoding and decoding function: Encoding: This function needs to accept a signed integer in the 14-bit range [-8192..+8191] … The encoding process is as follows: Add 8192 to the raw value, so its range is translated to [0..16383]. …
arc4randall's user avatar
5 votes
0 answers
192 views

Huffman encoding in Rust

An implementation of Huffman encoding / decoding as a learning exercise. I'm still new to Rust, so any tips about making things more natural for the language are appreciated. … in encoding { write! …
user673679's user avatar
  • 11.9k
1 vote
1 answer
3k views

Corrects the encoding of a CSV file in Qt

); //If the encoded string has UTF8 errors, write it to the encode error file if ( ! … isUTF8( encoded.toStdString() ) ) { QFile encode( this->encodeErrFileName ); encode.open( QIODevice::ReadWrite | QIODevice::Append ); QTextStream encodeOut( &encode ); encodeOut …
k_dog345's user avatar
2 votes
2 answers
3k views

Run length encoding in C#

This is the original question: https://www.geeksforgeeks.org/run-length-encoding/ Given an input string, write a function that returns the Run Length Encoded string for the input string. … = "wwwwaaadexxxxxxywww"; string expected = "w4a3dex6yw3"; Assert.AreEqual(expected, RLE.Encode(str)); } } public class RLE { public static string Encode
Gilad's user avatar
  • 5,253
5 votes
2 answers
5k views

ASN.1 BER Encoding and Decoding

I have a project (ldaplib) I am working on that needs to do ASN1-BER decoding and encoding. … portion: def ber_encode(ber_cls, ber_pc, ber_tag, message): """ Encode a message into ASN1-BER (TLV) bytes. …
clutton's user avatar
  • 819
5 votes
2 answers
1k views

Variable integer encoding

There is a varint encoding, which I call LEP64 (Little Endian Prefix Max 64-bit). … Basically, the first byte of the encoded value tells us, how many bytes follow (needed bytes encoded in unary coding, then the value encoded simply in binary): First Byte following can encode values …
geza's user avatar
  • 151
2 votes
0 answers
1k views

Performance Tuning Base64 encoding

I've been trying to get a relatively optimized version of base64 encoding that works against files. … Codes64 is the string I'm using to encode the data with, not reproduced here for brevity) procedure TMyMimeEncoder.Enc64Buffer(inbuf, outbuf: pointer; inbufsize: longint; var outbufsize: longint …
Glenn1234's user avatar
  • 121
2 votes
1 answer
164 views

Vectorization, 7-bit encoding

To start simple I choose 7-bit encoding as my test suspect. I'm not expecting improved throughput in any way. … outputRefAsUint = ref Unsafe.As<byte, uint>(ref MemoryMarshal.GetReference(output)); //Writes the shuffled int to the output outputRefAsUint = shuffled.AsUInt32().GetElement(0); //7-Bit encoding
Joni's user avatar
  • 23

1
2 3 4 5
33
15 30 50 per page