The latter end of this article is really talking about the teleportation of information between two points. More information on this technique, and on teleportation using the same concept of coupling two photons, can be found here .
Sorry if someone already asked this question, but this thread has had a lot of activity.
Wouldn't this be an acceptible solution to this challenge.
Recall file length can be stored in a DWORD.
Begin by searching through the data file for the most occurances of subsequences of length M > 4. For each occurance of this sequence, you can store the position in a table, costing 4 bytes, and remove the sequence from the data file, reducing it by M bytes. This gives you a savings of M-4 bytes of each occurance. Depending on your luck, you may be able to find enough occurances to allow the decompressor to work, which would need to house the following information :
1. the original subsequence (size M)
2. array of locations N (size 4*number of occurances)
3. filename to decompress (2 bytes)
4. output filename (1 byte if needn't be the same). Or alternativey 3 & 4 can be stored in the command line.
5. code to implement the reintroduction of the subsequences into the original code, something along the lines of
FILE * fin = open(INPUT_FILE, READ);
FILE * fout = creat(OUTPUT_FILE);
for (i = 0; i < sizeof(N)/4; i++)
{
while(current_position < *N) putc(getc(fin), fout);
for(j = 0; j < sizeof(M);j++) putc(M[j], fout);
}
Anyone know of a general result giving the probability of an occurance of an M digit sequence appearing more than N times in a file of arbitrary length L? With appropriate values for M,N, and L, one minus this number would be Mike's chances of not having to pay...
The latter end of this article is really talking about the teleportation of information between two points. More information on this technique, and on teleportation using the same concept of coupling two photons, can be found here .
Sorry if someone already asked this question, but this thread has had a lot of activity.
Wouldn't this be an acceptible solution to this challenge.
Recall file length can be stored in a DWORD.
Begin by searching through the data file for the most occurances of subsequences of length M > 4. For each occurance of this sequence, you can store the position in a table, costing 4 bytes, and remove the sequence from the data file, reducing it by M bytes. This gives you a savings of M-4 bytes of each occurance. Depending on your luck, you may be able to find enough occurances to allow the decompressor to work, which would need to house the following information :
1. the original subsequence (size M)
2. array of locations N (size 4*number of occurances)
3. filename to decompress (2 bytes)
4. output filename (1 byte if needn't be the same). Or alternativey 3 & 4 can be stored in the command line.
5. code to implement the reintroduction of the subsequences into the original code, something along the lines of
FILE * fin = open(INPUT_FILE, READ);
FILE * fout = creat(OUTPUT_FILE);
for (i = 0; i < sizeof(N)/4; i++)
{
while(current_position < *N) putc(getc(fin), fout);
for(j = 0; j < sizeof(M);j++) putc(M[j], fout);
}
Anyone know of a general result giving the probability of an occurance of an M digit sequence appearing more than N times in a file of arbitrary length L? With appropriate values for M,N, and L, one minus this number would be Mike's chances of not having to pay...
No sig