In Django Design Patterns, the author recommends using zlib.crc32 to mask primary keys in URLs. After some quick testing, I noticed that crc32 produces negative integers about half the time, which seems undesirable for use in a URL. zlib.adler32 does not appear to produce negatives, but is described as "weaker" than CRC.
Is this method...
I need to communicate with a RS232 device, I have no specs or information available.
I send a 16 byte command and get a 16 byte result back. The last byte looks like some kind of crc or checksum, I have tried using this http://miscel.dk/MiscEl/miscelCRCandChecksum.html with no luck.
Anyone can reverse engineer the crc/checksum algorit...
I wish to use common CRC logic in a VB.NET or C# application as well as on a C/Linux application. I have one C/Linux application that interacts with a webservice (written in C#) and also a web application (written in VB.NET). For some data, I want to add a CRC to the data itself (say a file) from the .NET side and check for the integrity...
I am working on a function that will give me a Kermit CRC value from a HEX string. I have a piece of code in DELPHI. I am a .NET developer and need the code in C#.
function CRC_16(cadena : string):word;
var
valuehex : word;
i: integer;
CRC : word;
Begin
CRC := 0;
for i := 1 to length(cadena) do
begin
valuehex :=...
Hello
I'm working in a big java project, with about 400 classes. Suddenly I got this error
sun.awt.image.PNGImageDecoder$PNGException: crc corruption
at sun.awt.image.PNGImageDecoder.getChunk(PNGImageDecoder.java:699)
at sun.awt.image.PNGImageDecoder.getData(PNGImageDecoder.java:707)
at sun.awt.image.PNGImageDecoder.produce...
I have a sensing device that transmits a 6-byte message along with an 1-byte counter and supposedly a checksum.
The data looks something like this:
------DATA----------- -Counter- --Checksum?--
55 FF 00 00 EC FF ---- 60---------- 1F
The last four bits in the counter are always set 0, i.e those bits are probably not used. The last ...
[root@blanee local_cache]# gem install dm-core-0.9.11.gem
ERROR: While executing gem ... (Zlib::GzipFile::CRCError)
invalid compressed data -- crc error
[root@blanee local_cache]# gem install ParseTree-3.0.5.gem
ERROR: While executing gem ... (Zlib::GzipFile::CRCError)
invalid compressed data -- crc error
I have a lot gem p...
Hi guys,
I need to implement the CRC error detection in my system. I wonder how to
determine the maximal number of detectable error (and undetectable as well) having the generation polynomial?
Assume that I have got, say, the following g(x) = x^4 + x^3 + 1.
There are 2^15 possible transmissions - the 11-bit words might be protected by...
Hi guys,
How to find the Hamming distance of a code generated by a certain CRC?
Assume that I have a generating polynomial of order, say, 4 and 11 bits of data.
How to compute the HD basing only on these information?
Cheers.
...
If I have a certain number of bytes to transfer serially, how do I determine which CRC (CRC8, CRC16, etc., basically a how many bit CRC?) to use and still have error detection percentage be high? Is there a formula for this?
...
Hi, i'm trying to implement a CRC-CCITT (XModem) check in javascript without success.
I need it in order to send socket string into a controller via RS232.
does anyone know how to do it? or perhaps is there a sample code somewhere??
I would appreciate any kind of help :)
...
I need to compute the CRC-16 for arbitrary strings in a mixed java/groovy application. Specifically, I need the CRC-16-ANSI aka CRC-16-IBM variant (see http://en.wikipedia.org/wiki/Cyclic_redundancy_check for details; this is the modbus / USB version.)
I could implement my own, but I'd much rather find a library out there that someone ...
On application startup I build a cache of icons (24x24 32bbp pre-multiplied argb bitmaps). this cache contains roughly a thousand items. I don't want to store the same image multiple times in this cache, for both memory and performance reasons. I figured the best way would be to create some sort of crc from each bitmap as it goes into th...
The situation is this: My system (Win XP Pro) is unable to copy a huge video file (around 6 gigs) from a DVD disk, which might be defective, scratched or whatever but which can be played back with mplayer with a few frames full of mosaic though. When the copying process lasted for a certain length of time, the system would abort the effo...
Hi,
I am developing an application in flex in which I need to calculate checksum of different files. I would like to know if there is a direct method in actionscript to calculate that or do I have to go for any external libraries?
Thanks in advance :)
...
Can someone please code me the CRC64 Reverse Algorithm in C#? I am unable to code it, can't understand anything. Thanks,
I have copied the CRC64 Checksum code from C++ and converted it into C# .NET. The entire code is displayed below:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CRC64...
I am learning, trying to get thoughts behind CRC. I can't find CRC128 and CRC256 code anywhere. If anyone of you have the C++ or C# Code for them, please share them with me. Also provide online links to the websites. I am a newbie and can't code it by myself at all, neither can convert theories and mathematics to the coding. So I ask for...
How can I verify two CRC implementations will generate the same checksums?
I'm looking for an exhaustive implementation evaluating methodology specific to CRC.
...
Hi
So I have a CRC polynomial x3 + x1 + 1 on a letter 'P'
I need to divide the binary code of 'P' by the polynomial
But I'm stuck at this point..
0 1 0 1 0 0 0 0 000 | 1 0 1 1
1 0 1 1 |
--------- |
1 1 1 0 0
? 1 0 1 1
I don't understand what to do with the 1 in front?
Does someone know an answer here?
...
Given a file on the local filesystem:
FileInfo file = new FileInfo(localFilename);
How can I get a CRC-value (or some kind of checksum) for that file?
...