diff options
author | Andrew Dolgov <[email protected]> | 2014-10-24 15:08:53 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-10-24 15:08:53 +0400 |
commit | 3d3e56bc75f19609c7d24238122722b16b1cd160 (patch) | |
tree | ae7723cc53cfc46b282712e9783931671a61720a /org.fox.ttcomics/src/main/java/com/github/junrar/rarfile/FileNameDecoder.java | |
parent | e83b41e97dc264d562a52e17bd9c185dcd76dcad (diff) |
remove unrar library because it sucks
use cardview for comic tiles
remove comics list
Diffstat (limited to 'org.fox.ttcomics/src/main/java/com/github/junrar/rarfile/FileNameDecoder.java')
-rw-r--r-- | org.fox.ttcomics/src/main/java/com/github/junrar/rarfile/FileNameDecoder.java | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/org.fox.ttcomics/src/main/java/com/github/junrar/rarfile/FileNameDecoder.java b/org.fox.ttcomics/src/main/java/com/github/junrar/rarfile/FileNameDecoder.java deleted file mode 100644 index aee1179..0000000 --- a/org.fox.ttcomics/src/main/java/com/github/junrar/rarfile/FileNameDecoder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * - * Original author: alpha_lam - * Creation date: ? - * - * Source: $HeadURL$ - * Last changed: $LastChangedDate$ - * - * - * the unrar licence applies to all junrar source and binary distributions - * you are not allowed to use this source to re-create the RAR compression algorithm - * - * Here some html entities which can be used for escaping javadoc tags: - * "&": "&" or "&" - * "<": "<" or "<" - * ">": ">" or ">" - * "@": "@" - */ -package com.github.junrar.rarfile; - -public class FileNameDecoder { - public static int getChar(byte [] name,int pos){ - return name[pos]&0xff; - } - - public static String decode(byte [] name,int encPos){ - int decPos = 0; - int flags = 0; - int flagBits = 0; - - int low = 0; - int high = 0; - int highByte = getChar(name,encPos++); - StringBuffer buf = new StringBuffer(); - while(encPos < name.length){ - if(flagBits == 0){ - flags = getChar(name,encPos++); - flagBits = 8; - } - switch(flags >> 6){ - case 0: - buf.append((char)(getChar(name,encPos++))); - ++decPos; - break; - case 1: - buf.append((char)(getChar(name,encPos++)+(highByte<<8))); - ++decPos; - break; - case 2: - low = getChar(name,encPos); - high = getChar(name,encPos+1); - buf.append((char)((high << 8) + low)); - ++decPos; - encPos += 2; - break; - case 3: - int length = getChar(name,encPos++); - if((length&0x80)!=0){ - int correction = getChar(name,encPos++); - for(length=(length&0x7f)+2;length>0&&decPos<name.length;length--,decPos++){ - low = (getChar(name,decPos) + correction)&0xff; - buf.append((char)((highByte << 8) + low)); - } - }else{ - for(length+=2;length>0&&decPos<name.length;length--,decPos++){ - buf.append((char)(getChar(name,decPos))); - } - } - break; - } - flags = (flags << 2) & 0xff; - flagBits -= 2; - } - return buf.toString(); - } -} |