aria 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #------------------------------------------------------------------------------
  2. # URL: https://de.wikipedia.org/wiki/Aria_(Software)
  3. # Reference: https://github.com/aria2/aria2/blob/master/doc/manual-src/en/technical-notes.rst
  4. # From: Joerg Jenderek
  5. # Note: only version 1 suited
  6. # check for valid version one
  7. 0 beshort 0x0001
  8. # skip most uncompressed DEGAS med-res bitmap *.PI2 and GEM bitmap (v1) *.IMG
  9. # by test for valid infoHashCheck extension
  10. >2 ubelong&0xffFFffFE 0x00000000
  11. # skip DEGAS med-res bitmap DIAGRAM1.PI2 by test for valid length of download
  12. >>(6.L+14) ubequad >0
  13. >>>0 use aria
  14. 0 name aria
  15. # version; (0x0000) or (0x0001); for 0 all multi-byte are in host byte order. For 1 big endian
  16. >0 beshort x aria2 control file, version %u
  17. #!:mime application/octet-stream
  18. !:mime application/x-aria
  19. !:ext aria2
  20. # EXTension; if EXT[3]&1 == 1 checks whether saved InfoHash and current downloading the same; infoHashCheck extension
  21. >2 ubelong !0 \b, infoHashCheck %#x
  22. # info hash length like: 0 14h
  23. >6 ubelong !0 \b, %#x bytes info hash
  24. # info hash; BitTorrent InfoHash
  25. >>10 ubequad x %#16.16llx...
  26. # piece length; the length of the piece like: 400h 100000h
  27. >(6.L+10) ubelong x \b, piece length 0x%x
  28. # total length; the total length of the download
  29. >(6.L+14) ubequad x \b, total length %llu
  30. #>(6.L+14) ubequad x \b, total length %#llx
  31. # upload length; the uploaded length of download like: 0 400h
  32. >(6.L+22) ubequad !0 \b, upload length %#llx
  33. # bitfield length; the length of bitfield like: 4 6 Ah 10h 13h 167h
  34. >(6.L+30) ubelong x \b, %#x bytes bitfield
  35. # bitfield; bitfield which represents current download progress
  36. >(6.L+34) ubequad !0 %#llx...