Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think my approach is better, no matter how big a file you want to store I only have to store the same amount of data... all I do is hash it first.

Still working on the restore side of things, but that can't be too difficult, can it?



It's easy actually, the following code snippet will restore any file as long as you still have the hash:

  bignum i;

  for (i=0;i<MAXBIGNUM;i++) {
      if (hash(i) == filehash) {
          break;
      }
  }

  fprintf("%Bd",i);


Thanks for the JavaScript!


I really hope you're not serious, but on the off-chance that you are, bignum is not exactly a javascript data type and fprintf isn't a standard javascript function either.

It was more of a pseudo code joke.

If you weren't serious, congratulations ;)


What, you mean hashes don't won't like compression?


Sure they do ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: