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 = gzopen($filename,"r");
$content = gzread($filename,250000);
gzclose($f);
.... but man, there'...
I'm working on an embedded device that does not support unaligned memory accesses.
For a video decoder I have to process pixels (one byte per pixel) in 8x8 pixel blocks. The device has some SIMD processing capabilities that allow me to work on 4 bytes in parallel.
The problem is, that the 8x8 pixel blocks aren't guaranteed to start on...
For an application I'm creating, I need to be able to read AAC and MP3 files and get the waveform data (not play it directly, I need to manipulate the data before playing).
Ideally, I should be able to read any MP3/AAC file out there (VBR, different bitrates, etc), or at least anything that could potentially show up in iTunes.
This last...
The main players seem to be x264, and xvid, and both are GPL. This means we can't integrate decoding capabilities into a playback application without licensing the whole thing as GPL, so we can't use either.
The preferred target platform is Linux. Any non-viral open license is fine, we're more than happy to provide the source of any ch...
I'm having a hard time understanding TCM. I've been trying to decipher this explanation, but I'm not having much luck.
I'm not looking for lots of detail, just the basics of TCM encoding and decoding. A simple example of encoding and decoding a short string would great!
Thanks!
...
Hi,
Does anyone know for any good resource on the web or book where the explanation for Viterbi decoder or a tutorial on how to decode a received bit sequence by using trellis diagram could be found?
Thanks!
...
I have a strange problem with lxml when using the deployed version of my Django application. I use lxml to parse another HTML page which I fetch from my server. This works perfectly well on my development server on my own computer, but for some reason it gives me UnicodeDecodeError on the server.
('utf8', "\x85why hello there!", 0, 1,...
I am facing a performance problem while using the FileStream.Write function.
I have a console application that i use to read a Base64 string from a file (~ size is 400 KB) using a StreamReader object. I convert this string to a byte array using Convert.FromBase64String. I then write this byte array to a file using the FileStream obj...
Hi My friend is using Base64 encoding standard in java.
I am using IPhone how can I decode the data. and viceversa.
There is org.apache.commons.codec.binary.Base64.decodeBase64 in java
Thanks
Deepak
...
Hello,
I've got a process which attempts to decode different encodings of strings from a binary stream. I get some behavior which does not quite add up in my mind when I step through it. Specifically, what I do is:
obtain the maximum number of bytes which would be used to encode a character in the given encoding
grab the amount of b...
I am starting the process of writing an application, one part of which is to decode bar codes, however I'm off to a bad start. I am no bar code expert and this is not a common bar code type, so I'm in trouble. I cannot figure out what type of bar code this is, which I have to decode.
I have looked on Wikipedia and some other sites with ...
In python:
u'\u3053\n'
Is it utf-16?
I'm not really aware of all the unicode/encoding stuff, but this type of thing is coming up in my dataset,
like if I have a=u'\u3053\n'.
print gives an exception and
decoding gives an exception.
a.encode("utf-16") > '\xff\xfeS0\n\x00'
a.encode("utf-8") > '\xe3\x81\x93\n'
print a.encode("utf-8...
Is it expected behavior that two encodings can map to the same decoding? I'm trying to troubleshoot a digital signature issue by doing sanity checks on base64-encoded intermediate strings.
For example, the following base64 encoding:
R0VUDQoNCg0KRnJpLCAwNCBTZXAgMjAwOSAxMTowNTo0OSBHTVQrMDA6MDANCi8=
and:
R0VUCgoKRnJpLCAwNCBTZXAgMjAwOSA...
Hi guys,
MySQL saves all changes to the database in a binary file called binary log.
MySQL provides a decoder called mysqlbinlog to decode these files. I thought if I wanted to parse this log file directly from an application then I need to find a way to decode it myself using C# for instance.
I know if I had the privilege I could use ...
Hi all,
This line of code, which decodes an encoded Chinese word:
URLDecoder.decode("%E4%BB%BB%E4%BD%95%E8%BD%A6%E8%BE%86%E5%BA%94",
"UTF-8").getBytes().length
When I run it in a JSP page (on Jboss) it prints 5:
<%= URLDecoder.decode("%E4%BB%BB%E4%BD%95%E8%BD%A6%E8%BE%86%E5%BA%94",
"UTF-8").getBytes().length %>
Running...
I am trying to generate UTF-8 QRCode so that I can encore accents and Unicode characters.
To test it, I am using many decoding solution :
http://zxing.org/w/decode.jspx - The zxing project also used in Android
http://www.drhu.org/QRCode/QRDecoder.php - a PHP Decoder
http://zbar.sf.net - The ZBar bar code reader - OpenSource and C proj...
Hi
when i am trying to open a page using window.open, its not working. The path shown is like "xyz/a%20b%20c%20.pdf" where it is suppose to be "xyz/abc.pdf". if i remove the "%" and "20" manualy, it will work.. how can i remove this using code?? please help me
Thanks in advance..
tismon
...
I'm writing some quick code to try and extract data from an mp3 file header.
The objective is to extract information from the header such as the bitrate and other vital information so that I can appropriately stream the file to a mp3decoder with the necessary arguments.
Here is a wikipedia image showing the mp3header information:
http:...
Hi there. I have connected to a DVR system which is serving up a continuous live feed from CCTV camera. I am fairly sure the format is H264 (the first 4 bytes are 4HKH). I would like to know how I can read the stream and get images from it for playback. I am currently coding in C# and then I want to move across to the iPhone. I have to u...
The following java code does exactly what is expected:
1 String s = "♪♬♪♪♬♪♪♬♪♪♬♪♪♬♪♪♬♪";
2 for(int i=0; i < s.length(); i++)
3 {
4 System.out.print(s.substring(i,i+1));
5 //System.out.print("\r");
6 Thread.currentThread().sleep(500);
7 }
But when I try to add carriage return by commenting i...