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
379
votes
1 answer

NodeJS: How to decode base64 encoded string back to binary?

I was implementing password hashing with salt, so I generated salt as binary, hashed the password, base64 encoded the password and salt then stored them into database. Now when I am checking password, I am supposed to decode the salt back into…
Xavier_Ex
  • 8,432
  • 11
  • 39
  • 55
186
votes
5 answers

Why does base64 encoding require padding if the input length is not divisible by 3?

What is the purpose of padding in base64 encoding. The following is the extract from wikipedia: "An additional pad character is allocated which may be used to force the encoded output into an integer multiple of 4 characters (or equivalently when…
Anand Patel
  • 6,031
  • 11
  • 48
  • 67
121
votes
8 answers

How to decode Unicode escape sequences like "\u00ed" to proper UTF-8 encoded characters?

Is there a function in PHP that can decode Unicode escape sequences like "\u00ed" to "í" and all other similar occurrences? I found similar question here but is doesn't seem to work.
Docstero
  • 1,287
  • 3
  • 11
  • 6
92
votes
13 answers

How can I send and receive WebSocket messages on the server side?

How can I send and receive messages on the server side using WebSocket, as per the protocol? Why do I get seemingly random bytes at the server when I send data from the browser to the server? It the data encoded somehow? How does the framing work…
pimvdb
  • 151,816
  • 78
  • 307
  • 352
62
votes
2 answers

Decode gzipped web page retrieved via cURL in PHP

I'm retrieving a gzipped web page via curl, but when I output the retrieved content to the browser I just get the raw gzipped data. How can I decode the data in PHP? One method I found was to write the content to a tmp file and then ... $f =…
Ian
  • 11,920
  • 27
  • 61
  • 77
57
votes
5 answers

Decoding URL parameters with JavaScript

This should be a simple task, but I can't seem to find a solution. I have a basic string that is being passed through as a query string parameter like this one: This+is+a+message+with+spaces. I would like to decode that parameter using JavaScript to…
user852367
  • 1,000
  • 1
  • 9
  • 15
53
votes
1 answer

Unable to do low-level decoding of video on Android 4.2 without using media extractor

I wanted to decode video frames without using an extractor. So I just tried a small sample, where I use media extractor but I don't do extractor.readsample() to copy the bitstream data into the input buffer instead I use FFmpeg parser, inside JNI,…
41
votes
4 answers

Request returns bytes and I'm failing to decode them

Essentially I made a request to a website and got a byte response back: b'[{"geonameId:"703448"}..........'. I'm confused because although it is of type byte, it is very human readable and appears like a list of json. I do know that the response…
koda gates
  • 413
  • 1
  • 4
  • 5
35
votes
3 answers

Decoding Raw H264 stream in android?

I have a project where I have been asked to display a video stream in android, the stream is raw H.264 and I am connecting to a server and will receive a byte stream from the server. Basically I'm wondering is there a way to send raw bytes to a…
will
  • 711
  • 1
  • 9
  • 12
34
votes
4 answers

How to get h264 video info?

How can I get specific h264 video information from video file? I need to know profile (Baseline/Main/High) and is there B-Frames in movie?
Zelenov
  • 953
  • 1
  • 9
  • 15
33
votes
5 answers

Decoding URI query string in Java

I need to decode a URI that contains a query string; expected input/output behavior is something like the following: abstract class URIParser { /** example input: * something?alias=pos&FirstName=Foo+A%26B%3DC&LastName=Bar */ …
Jason S
  • 184,598
  • 164
  • 608
  • 970
27
votes
7 answers

How to stop an html TEXTAREA from decoding html entities

I have a strange problem: In the database, I have a literal ampersand lt semicolon: <div whenever its printed into a html textarea tag, the source code of the page shows the > as >. How do I stop this decoding?
Rami Dabain
  • 4,709
  • 12
  • 62
  • 106
27
votes
7 answers

How do I allow HTML tags to be submitted in a textbox in asp.net?

First, I want to let everyone know that I am using an aspx engine not a Razor engine. I have a table within a form. One of my textbox contains html tags like
Phone:
814-888-9999
Email:
aaa@gmail.com. When I go to build it…
Yusuf
  • 611
  • 4
  • 9
  • 21
27
votes
4 answers

Fastest PNG decoder for .NET

Our web server needs to process many compositions of large images together before sending the results to web clients. This process is performance critical because the server can receive several thousands of requests per hour. Right now our solution…
sboisse
  • 4,860
  • 3
  • 37
  • 48
23
votes
7 answers

base64 encoding that doesn't use "+/=" (plus or equals) characters?

I need to encode a string of about 1000 characters that can be any byte value (00-FF). I don't want to use Hex because it's not dense enough. the problem with base64 as I understand it is that it includes + / and = which are characters I can not…
Peter Kellner
  • 14,748
  • 25
  • 102
  • 188
1
2 3
99 100