43 Topics
|
|
I'm using sockets in C to write 10 bytes to a socket and then read 10 bytes from that socket. I create a parent process that forks, creating a child that acts as the socket server that writes the 10 bytes. After the 10 bytes are wrote, back in the … |
|
Hey guys, I'm working on a project to use Huffman trees to compress a text file into binary. For instance, based on the frequency of the characters in a string like "aardvark", a - 3 r - 2 d - 1 v - 1 k - 1, compression using a … |
|
The total number of objects on one of my page is 76 which by their number will dominate web page delay. how can I reduce this to a more reasonable number? The total size of my page is 1451727 bytes, which will load in 304.53 seconds on a 56Kbps modem. … |
|
Hey guys, quick questions! 1- How can I check the size of a variable? Size in bytes, not length. (; 2- What data can be stored into byte variables? And what the maxium size of the variable? 3- How do I store data inside a byte variable? Thats all for … |
|
Hi guys! Well I'll be quick, I just want to know how the formula below works. Ls = least significant bit; Ms = most significant bit; Ls | Ls1 << 8 | Ls2 << 16 | Ms << 24 This formula is intended to turn four separate bytes into a … |
|
Hi all, I am stucked at this problem - net to let user set string as byte eg. "0xFF", And parse it to byte. Problem is, that using... [CODE] byte byteVar = (byte) "0xFF"; [/CODE] ...is incompatible. Nice page about this is [URL="http://www.herongyang.com/Java/Byte-Data-Type-Implicit-Casting.html"]there[/URL]. Any idea how solve this? Thx for … |
|
I have a byte array which looks something like 01 00 02 00 73 45 69 A5 So i have to read first 2 bytes and convert it into integer to get its value. Same for next 2 bytes and then next 4 bytes. Here the value for first 2 … |
|
Hi Guys, As the title says really... Sounds simple, it is. But....! I'm dealing with huge numbers here. I'm dragging bandwidth from a logging system I am developing for a client and it returns it in BYTES... Very accurate :| This is the sort of number I'm dealing with here... … |
|
Dear All , The question is quite simple for all of you . I have a binary file . A description for this file says that : "first 2 bytes in the header is the number of records" I have opened this file and loaded it into bytes by this … |
|
Hi! Could you tell me what did I do wrong in the code bellow? I try to read one line from a file, but it shows on the screen only unknown characters(different from the characters I have in the file). [Code] GetLine Proc Hand:HANDLE, pBuf:DWord Local Len:DWord Local rLen:DWord Local … |
|
Okay, so C++ has no specific byte class, but what they do have is an unsigned char class to convert ints/doubles/floats to binary/bytes. In trying to convert some Java to C++, I am trying to keep some of the function signatures the same or close to the same, and in … |
|
Hi, I first convert the image on the server application in bytes: [code] //server public void sendImage(File file) throws IOException { ByteArrayOutputStream baos=new ByteArrayOutputStream(1000); BufferedImage img=ImageIO.read(new File(file.getAbsolutePath())); ImageIO.write(img, "jpg", baos); baos.flush(); os.write(baos.toByteArray());// this is a "new DataOutputStream(clientSocket.getOutputStream());" System.out.println("Done! Length is:"+baos.toByteArray().length); baos.close(); } [/code] Then my application freezes when trying to … |
The End.