encoding « Development « C Q&A

Home
C Q&A
1.assembly
2.buffer
3.Card
4.Cast
5.compile
6.console
7.const
8.constructor
9.database
10.Date
11.Debug
12.Design
13.Development
14.DLL
15.encrypt
16.enum
17.eof
18.Event
19.fork
20.Format
21.gcc
22.gdb
23.graph
24.graphics
25.gui
26.Holiday Event
27.image
28.IP
29.iterator
30.macro
31.makefile
32.malloc
33.Menu
34.mysql
35.network
36.openssl
37.operator
38.password
39.pipe
40.preprocessor
41.printf
42.pthread
43.Regular expression
44.scanf
45.semaphore
46.SerialPort
47.server
48.Socket
49.sql
50.SQLserver
51.sscanf
52.std
53.stdin
54.stdout
55.stl
56.strcmp
57.stream
58.switch
59.Template
60.thread
61.timer
62.unix
63.video
64.Virtual
65.visualstudio
66.winapi
67.windows
68.xml
C Q&A » Development » encoding 

1. Chunked responses in libevent2    stackoverflow.com

I am trying to do a chunked response (of large files) in libevent this way::

evhttp_send_reply_start(request, HTTP_OK, "OK");

int fd = open("filename", O_RDONLY);
size_t fileSize = <get_file_size>;
struct evbuffer *databuff = NULL;
for (off_t offset = ...

2. RLE Encoding...What's the wrong?    stackoverflow.com

I'm trying to make a RLE (Run-Length Encoder) Programme just for characters. I read the way it works on notes on net. And I tried to fix my code! Regardless I think that ...

3. How to do hex8 encoding in c?    stackoverflow.com

I am trying to encode a string in hex8 using c. The script I have right now is:

int hex8 (char str) {
 str = printf("%x", str);
 if(strlen(str) == 1) {
  ...

4. Encoding h.264 with libavcodec/x264    stackoverflow.com

I am attempting to encode video using libavcodec/libavformat. Audio works great, but when I try to encode video I get the following errors:

[libx264 @ 0x10182a000]broken ffmpeg default settings detected  
[libx264 ...

5. Encoding h.264 with libavcodec/x264    stackoverflow.com

I am attempting to encode video using libavcodec/libavformat. I'm trying to change the standard output-example.c from ffmpeg source. The AVI file is created on the disk, but the only sound is ...

6. C - URL encoding    stackoverflow.com

Is there a simple way to do URL encode in C? I'm using libcurl but I haven't found a method. Specifically, I need to do percent escapes.

7. What is the maximum chunk size in HTTP response with Transfer-Encoding chunked?    stackoverflow.com

The w3.org (RFC2616) seems not to define a maximum size for chunks. But without a maximum chunk-size there is no space for the chunk-extension. There must be a maximum ...

8. HDLC Extended Addressing    stackoverflow.com

Can any one please provide me with good resource information about where and how I can understand the encoding of the "Address field" (in an HDLC frame) into Octets, using the ...

9. libcurl C API > POST ranges of data obtained from URL    stackoverflow.com

How can I post ranges of data obtained from URL, not from file? Say I need to read 150-250000 bytes from http://localhost/video.mp4 (A) and POST this data to

10. Run Length encoding    bytes.com

No that is what you want to use the run length encoding algorithm for; not what the algorithm actually does. donbock is asking if you have any knowledge of what the run length encoding algorithm does because knowing what it does is certainly a precursor to knowing how to implement it. If you don't know what it does, i.e. you are ...

11. Huffman encoding in C    bytes.com

13. Lost in encoding stuff    bytes.com

Alexander Adam Hi, I am a bit list in encoding related stuff. Let me explain what I am doing (yes it's C++ :)): I am getting some input content due Expat Xml Parser. I've setup Expat to use wchar_t. First question is this -- what is the difference of unsigned short, wchar_t and char? Okay, wchar_t is an built-in type of ...

14. Problem with user-defined IO streambuf for encoding purposes    bytes.com

P: n/a hsmit.home@gmail.com Hi everyone, I'm having some difficulty with the following piece of code. I have stripped it to it's bare minimum to demonstrate the problem at hand. Compiler: MS Visual C++ 2005 Express Edition (similar problem arises with 2008) Runtime Library: All multi-threaded variants have been seen to fail [DLL/Static] | [Debug|Release] Purpose: define a user defined stream buffer ...

15. Encoding and decoding methods    bytes.com

16. how to distinguish what is the encoding style of the text?    bytes.com

* ?????: I deal with some text and the result is "......" (these words are chinese) how to distinguish what is the encoding style of the text? Could some give some experence? It's a very small sample you've given, but it looks like numeric HTML character entities. In that case it's Unicode specified in decimal. Anyway, it has nothing to do ...

17. Encoding    bytes.com

18. Help with code for encoding and decoding letters    cboard.cprogramming.com

Hi I'm pretty new to programming and I need some help getting this code to work. Its supposed to offer the user a choice to either encode letters or decode them. Their supposed to enter 1 to encode, where they enter a number of random letters "khgdhf" and the result will be "1k2h1g1d1f" or 2 to decode where they enter the ...

19. A few encoding and replacement questions...    cboard.cprogramming.com

20. RLE Encoding/Decoding using simple C concept..plz help    cboard.cprogramming.com

Run length encoding is a compression technique that takes advantage of repeated consecutive digits. Encoding involves putting a character followed by count. Example input: 123334455555AAA Output for above input: 1\12\13\34\25\5A\3 (1 is appearing once, 2 is appearing twice,k 3 is appearing 3 times, 4 is appearing twice, 5 is appearing 5 times, A is appearing 3 times. \ represents the ESCAPE ...

21. encoding scheme    cboard.cprogramming.com

22. Caesar's encoding problem    cboard.cprogramming.com

If you haven't redone your algorithm yet, here's my version Restate the encoding process: Take any lower case letter ASCII value and add the key value. Modulo the sum of that to get a range of 0 to 95 inclusive. Now add 32 to the modulus result to get range of 32 to 127 using any key that is any positive ...

23. Encoding with random ASCII    cboard.cprogramming.com

Actually the procedures are: 1. Convert each character, including blank space, to its ASCII equivalent 2. Generate a positive random integer. Add this integer to the ASCII equivalent of each character. The same random integer will be used for the entire line of text. 3 Suppose that N1 represents the lowest permissible value in the ASCII code, and N2 represents the ...

24. huffman encoding help    cboard.cprogramming.com

25. Huffman Encoding    cboard.cprogramming.com

If I first might make a suggestion, The Compression Book by Mark Nelson and Jean-Loup Gailly is a book I've been looking at lately, and it does have source for pretty much everything. I'm going to umm, paraphrase their code now, basically an ineffecient version. First, a note on how character frequency is stored, Huffman Encoding does not need the ranking ...

26. How to specify the cp1251 encoding to the query in C    forums.devshed.com

I have a question about C and mysql. I have a C program that connect to a mysql DB. One of the tables has a cp1251-encoded Cyrillic column and when I read it with C I get ???? ?? ??? So is there a way to specify the cp1251 encoding to the query (just as it is done in php) in ...

27. Caesar's encoding    forums.devshed.com

I used the following code and it worked Code: #include void Ceasar_enc(char text[],int key) { char *p=text; long int temp; while(*p) { /* 127 - 32= 96 ascii values plus 32 to start from 32 not from 0 and end to ascii char 127 not 96 */ temp=(*p+key - 32)%96+32; *p++=(char)temp; } } void Ceasar_dec(char text[],int key) { char *p=text; ...

28. GA and encoding    forums.devshed.com

Hey ya The way I understand Genetic Algorithms, when you create a random solution to the problem you have to encode it first. So if your solution is 2 + 2 + 4 you have to encode it to say binary wich will give you 0010 1111 0010 1111 0100 Now when you have to get a Fitness of that chromo ...

29. How to specify the cp1251 encoding to the query in C    daniweb.com

conn = mysql_init(NULL); /* Connect to database */ if (!mysql_real_connect(conn, server, user, password, database, 0, NULL, 0)) { fprintf(stderr, "%s\n", mysql_error(conn)); // exit(1); } // razdeliane na ziavkata na chasti za da moga da sloja v neia promenliva sprintf(query1, "SELECT f.Tmin, Tmax, f.Phen, b.sin_kod, b.namen, LEFT(f.timea, 10), SUBSTRING(f.timea, 12, 2), s.sin_name " "FROM fcs f, bgc b, sinoptic s " "WHERE ...

30. encoding/decoding    daniweb.com

#include FILE *csis *fp; void getCode(char code[53]); int getMessage(int msg[]); void sortMessage(int msg[], int msgSize); void decodeMessage(char code[53], int msg[], int msgSize); void main(void){ int i; char code; //Calls methods getCode(char code[53]); getMessage(int msg[]); sortMessage(int msg[], int msgSize); decodeMessage(char code[53], int msg[], int msgSize); return 0; //....... calls the four methods }//end main void getCode(char code[53]) { fopen_s(&fp, "codefile.txt", "r"); ...

31. Encoding and decoding. basic C    daniweb.com

Of course, you must call fopen before you will get any file contents (then fclose the file). What's a question... It does not matter where these calls placed: in the main routine or in a special function or what else... It seems you have another problem. There are lots of methods to encode or to decode cipher text (or binary data). ...

32. Encoding/Decoding    daniweb.com

Hey everyone. Been doing C for a little while now and this website has helped me in advancing my knowledge and skills in C programming. I have another question now... it's really bugging me actually... I'm trying to make a program basically just encode and decode. It seems too simple for me not to understand but... I'm teaching myself so that's ...

33. Encoding and Decoding Text    codeproject.com

Homework and Gimmecode in the same question... Well... - Get familiar on how should you open and work with files... - Once you've learnt how to open files, read the content. - You will need to use a bucle, an interator (the one that a 2 modulus operation will tell you if it is even or odd). ...

34. Encoding Type issue?    codeproject.com

35. Encoding/Decoding DATA    tek-tips.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.