Update to 16kb

release^2
jhengazuki 2 months ago
parent 007eadd419
commit cf96994333
  1. 2
      app/src/main/java/com/fongmi/android/tv/utils/Download.java
  2. 4
      app/src/main/java/com/fongmi/android/tv/utils/FileUtil.java
  3. 2
      catvod/src/main/java/com/github/catvod/utils/Util.java

@ -56,7 +56,7 @@ public class Download {
private void download(InputStream is, double length) throws Exception {
try (BufferedInputStream input = new BufferedInputStream(is); FileOutputStream os = new FileOutputStream(file)) {
byte[] buffer = new byte[4096];
byte[] buffer = new byte[16384];
int readBytes;
long totalBytes = 0;
while ((readBytes = input.read(buffer)) != -1) {

@ -45,7 +45,7 @@ public class FileUtil {
}
public static void gzipCompress(File target) {
byte[] buffer = new byte[1024];
byte[] buffer = new byte[16384];
try (FileInputStream is = new FileInputStream(target); GZIPOutputStream os = new GZIPOutputStream(new FileOutputStream(target.getAbsolutePath() + ".gz"))) {
int read;
while ((read = is.read(buffer)) > 0) os.write(buffer, 0, read);
@ -57,7 +57,7 @@ public class FileUtil {
}
public static void gzipDecompress(File target, File path) {
byte[] buffer = new byte[1024];
byte[] buffer = new byte[16384];
try (GZIPInputStream is = new GZIPInputStream(new BufferedInputStream(new FileInputStream(target))); BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(path))) {
int read;
while ((read = is.read(buffer)) != -1) os.write(buffer, 0, read);

@ -90,7 +90,7 @@ public class Util {
try {
MessageDigest digest = MessageDigest.getInstance("MD5");
FileInputStream fis = new FileInputStream(file);
byte[] bytes = new byte[4096];
byte[] bytes = new byte[16384];
int count;
while ((count = fis.read(bytes)) != -1) digest.update(bytes, 0, count);
fis.close();

Loading…
Cancel
Save