Questions tagged [decoding]

Decoding is the reverse of encoding.

Decoding is the reverse of , which is the process of transforming information from one format into another understandable by a receiver. In communication theory and coding theory, decoding is the process of translating received messages into codewords of a given code. Like encoding, decoding applies to information of various forms:

1741 questions
0
votes
1 answer

Decoding a huffman table fast

I have a huffman encoded byte array of size 400 MB. Where the huffman tokens are all possible 4 bit values (0-15). I have to decode it within 1 minute. I need an efficient way to decode. In a 16gb ram windows system with a processor speed 2.8 Ghz.…
Sayantan Ghosh
  • 998
  • 2
  • 9
  • 29
0
votes
0 answers

Decoding a string to valid JSON

I am writing an add-on for Firefox. I'm catching a JSON file which should contain general user data which I need. To clarify this, the data is accessible without any security boundaries. Sometimes the caught string is a valid JSON (without any…
Feirell
  • 719
  • 9
  • 26
0
votes
0 answers

Encode a String, given a decoder

Given the following decoder, write the encoder. (The encoder should be written to compress whenever possible): p14a8xkpq -> p14akkkkkkkkpq (8xk gets decoded to kkkkkkkk. The only other requirement is that encodings be unambiguous) Note that the…
user1628340
  • 901
  • 4
  • 14
  • 27
0
votes
1 answer

Unknown symbol returned when scraping web in Javascript

I'm scraping the web using a node wrapper for the Bing API. I print the text data from the results and I get some weird boxes with question marks inside of them. I've tried using escape and decodeURIComponent, but it's not getting rid of the…
CuriousFellow
  • 225
  • 1
  • 3
  • 14
0
votes
2 answers

Creating a Python function

I have the following land use classes and they each have a key 1, 2, 3, 4, = [Arable] 5, 6, 7, = Non arable 8 = Protected c = Climate e = Erosion s = Soil w = Wetness estu= Estuaries ice = Ice lake = Lake quar = quarries/mines rive =…
Ray
  • 37
  • 2
0
votes
1 answer

PHP base64_decode eval found in all .php files for site. WHY?

A friend of mine asked to make some changes to his website. When looking at the code I found every php file had this single line of code. So I had to Decode the string and replace the file with the result. From there I was able to make the proper…
K3NN3TH
  • 1,458
  • 2
  • 19
  • 31
0
votes
1 answer

Python3 Unicode Decode Error

I get UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 0: invalid continuation byte When I try to call codecs.decode(X, 'utf-8') where X =…
Darrel Holt
  • 870
  • 1
  • 15
  • 39
0
votes
1 answer

Unexpected Python Arithmetic Behavior

I'm working on a huffman encoder/decoder in Python, and am experiencing some unexpected (at least for me) behavior in my code. Encoding the file is fine, the problem occurs when decoding the file. Below is the associated code: def decode(cfile): …
jaswon
  • 3
  • 3
0
votes
5 answers

Escape brackets on php for javascript

For example i've a php script with this content: :("); echo ""; ?> But the alert get broken by the last "(". How can i solve this?
Sein Kraft
  • 8,417
  • 11
  • 37
  • 39
0
votes
1 answer

Code and decode variable length integer in binary format efficiently

I need to store integers in range (0-50000000) in binary file and decode them later. To save space I am storing number of bytes required to decode the integer in first 2 bits of first byte i.e 01XXXXXX refers 2 bytes are required to save the…
learner
  • 123
  • 2
  • 11
0
votes
1 answer

ID3v1 tag in MP3 format

I am trying (or just started) to write music player from scratch (starting with MP3 format) and thus I have a question about the ID3v1/1.1 tag. Let's take a field from the tag, let's say, song title. It has 30 characters (bytes) and there is my…
0
votes
0 answers

Converting document from base 64 giving error

For my project user send me a base64 encoded code. I need to convert into pdf document. I am using the below code for the same. string AsBase64String = "base64code"; byte[] tempBytes =…
Dravid
  • 21
  • 3
0
votes
1 answer

HTTP Request Image and save to file system in Parse Cloud Code

I'm testing the self hosted parse-server-example and I want to request an image and save it on my server file system. My code so far: Parse.Cloud.define('getImage', function(request, response) { var fs = require('fs'); var testURL =…
baal
  • 257
  • 3
  • 12
0
votes
0 answers

how to open pdf, ppt, word, etc files in android?

I am downloading certain types of files in my app (pdf, ppt, doc, mp4, etc). Right now I am launching these files in their default applications in the device. Is there any way that I might open these inside my own app? I have explored other similar…
Sid
  • 435
  • 4
  • 9
  • 19
0
votes
1 answer

Getting Facebook original image url

I want to get the the original picture out of this Facebook…
Khaled Karam
  • 173
  • 1
  • 4
  • 13