Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile-Cn-Ko-En
Commits
73c1baf2
Commit
73c1baf2
authored
Nov 07, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级zipEntery提高zip读取数据长度并支持GBK编码格式
parent
ea6af759
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
16 deletions
+18
-16
mobile/build.gradle
mobile/build.gradle
+4
-4
mobile/libs/ZipEntry.jar
mobile/libs/ZipEntry.jar
+0
-0
mobile/src/main/java/cn/garymb/ygomobile/utils/ServerUtil.java
...e/src/main/java/cn/garymb/ygomobile/utils/ServerUtil.java
+5
-4
mobile/src/main/java/ocgcore/CardManager.java
mobile/src/main/java/ocgcore/CardManager.java
+5
-4
mobile/src/main/java/ocgcore/StringManager.java
mobile/src/main/java/ocgcore/StringManager.java
+4
-4
No files found.
mobile/build.gradle
View file @
73c1baf2
...
...
@@ -9,8 +9,8 @@ android {
minSdkVersion
23
//noinspection ExpiredTargetSdkVersion
targetSdkVersion
29
versionCode
31112000
3
versionName
"3.11.12"
versionCode
31112000
4
versionName
"3.11.12
fix1
"
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
true
ndkVersion
"20.1.5948944"
...
...
@@ -98,7 +98,7 @@ dependencies {
implementation
"org.igniterealtime.smack:smack-tcp:4.3.0"
//
implementation
'org.greenrobot:eventbus:3.0.0'
implementation
'com.tubb.smrv:swipemenu-recyclerview:5.4.
0
'
implementation
'com.tubb.smrv:swipemenu-recyclerview:5.4.
8
'
//
implementation
(
name:
'libWindbot'
,
ext:
'aar'
)
...
...
@@ -107,7 +107,7 @@ dependencies {
//dialog库
implementation
'com.github.feihuaduo:DialogUtils:1.8.9.23'
//recyclerview的adapter库
implementation
'com.github.CymChad:BaseRecyclerViewAdapterHelper:
3.0
.4'
implementation
'com.github.CymChad:BaseRecyclerViewAdapterHelper:
4.1
.4'
implementation
'androidx.appcompat:appcompat:1.7.0'
implementation
'com.google.android.material:material:1.12.0'
//图片选择
...
...
mobile/libs/ZipEntry.jar
0 → 100644
View file @
73c1baf2
File added
mobile/src/main/java/cn/garymb/ygomobile/utils/ServerUtil.java
View file @
73c1baf2
...
...
@@ -12,6 +12,9 @@ import android.content.Context;
import
android.text.TextUtils
;
import
android.util.Log
;
import
com.file.zip.ZipEntry
;
import
com.file.zip.ZipFile
;
import
org.greenrobot.eventbus.EventBus
;
import
java.io.BufferedReader
;
...
...
@@ -25,8 +28,6 @@ import java.nio.charset.StandardCharsets;
import
java.util.ArrayList
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipFile
;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.Constants
;
...
...
@@ -112,8 +113,8 @@ public class ServerUtil {
LogUtil
.
e
(
"GameUriManager"
,
"读取压缩包"
);
try
{
String
serverName
=
null
,
serverDesc
=
null
,
serverHost
=
null
,
serverPort
=
null
;
ZipFile
zipFile
=
new
ZipFile
(
file
.
getAbsoluteFile
());
Enumeration
<
?
extends
ZipEntry
>
entris
=
zipFile
.
e
ntries
();
ZipFile
zipFile
=
new
ZipFile
(
file
.
getAbsoluteFile
()
,
"GBK"
);
Enumeration
<
ZipEntry
>
entris
=
zipFile
.
getE
ntries
();
ZipEntry
entry
;
StringBuilder
content
=
new
StringBuilder
();
while
(
entris
.
hasMoreElements
())
{
...
...
mobile/src/main/java/ocgcore/CardManager.java
View file @
73c1baf2
...
...
@@ -8,6 +8,9 @@ import android.util.SparseArray;
import
androidx.annotation.WorkerThread
;
import
com.file.zip.ZipEntry
;
import
com.file.zip.ZipFile
;
import
java.io.BufferedInputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
...
...
@@ -19,8 +22,6 @@ import java.io.OutputStream;
import
java.util.ArrayList
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipFile
;
import
java.util.zip.ZipInputStream
;
import
cn.garymb.ygomobile.App
;
...
...
@@ -85,11 +86,11 @@ public class CardManager {
String
savePath
=
App
.
get
().
getExternalCacheDir
().
getAbsolutePath
();
List
<
File
>
fileList
=
new
ArrayList
<>();
ZipFile
zf
=
new
ZipFile
(
zipPath
);
ZipFile
zf
=
new
ZipFile
(
zipPath
,
"GBK"
);
InputStream
in
=
new
BufferedInputStream
(
new
FileInputStream
(
zipPath
));
ZipInputStream
zin
=
new
ZipInputStream
(
in
);
ZipEntry
ze
;
Enumeration
<
?
extends
ZipEntry
>
entris
=
zf
.
e
ntries
();
Enumeration
<
ZipEntry
>
entris
=
zf
.
getE
ntries
();
while
(
entris
.
hasMoreElements
())
{
ze
=
entris
.
nextElement
();
if
(
ze
.
isDirectory
())
{
...
...
mobile/src/main/java/ocgcore/StringManager.java
View file @
73c1baf2
...
...
@@ -16,8 +16,8 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util
.zip.ZipEntry
;
import
java.util
.zip.ZipFile
;
import
com.file
.zip.ZipEntry
;
import
com.file
.zip.ZipFile
;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.Constants
;
...
...
@@ -63,8 +63,8 @@ public class StringManager implements Closeable {
if
(
file
.
isFile
()
&&
(
file
.
getName
().
endsWith
(
".zip"
)
||
file
.
getName
().
endsWith
(
".ypk"
)))
{
Log
.
e
(
"StringManager"
,
"读取压缩包"
);
try
{
ZipFile
zipFile
=
new
ZipFile
(
file
.
getAbsoluteFile
());
Enumeration
<
?
extends
ZipEntry
>
entris
=
zipFile
.
e
ntries
();
ZipFile
zipFile
=
new
ZipFile
(
file
.
getAbsoluteFile
()
,
"GBK"
);
Enumeration
<
ZipEntry
>
entris
=
zipFile
.
getE
ntries
();
ZipEntry
entry
;
while
(
entris
.
hasMoreElements
())
{
entry
=
entris
.
nextElement
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment