标签: unzip

在Android中下载并解压缩Zip文件

我的应用程序是从服务器下载zip文件并提取此zip文件并将文件保存到SD卡但问题是,如果我下载4-5 MB的zip文件并解压缩,这是工作正常,但如果我正在下载30-35 MB zip文件这会给我错误,抱歉我的英语沟通不好.

下面是我的下载和解压缩Zip文件的代码: -

public class UnzipManager {
    private static String BASE_FOLDER;

    public static Context localContext;
    public static String passurl;
    public static int count;
    public static Context context;
    /*
     * You can use this flag to check whether Unzippingthread is still running..
     */
    public static boolean isDownloadInProgress;
    /*
     * After unzipping using this flag ,you can check whether any low memory
     * exceptions Occurred or not..and alert user accordingly..
     */
    public static boolean isLowOnMemory;
    public static int i …
Run Code Online (Sandbox Code Playgroud)

android unzip download

27
推荐指数
2
解决办法
7万
查看次数

gradle - 从url下载并解压缩文件

从url(http)下载和解压缩文件的正确方法是什么?

如果可能的话,我想防止每次运行任务时重新下载(ant.get可以通过实现skipexisting: 'true').

我目前的解决方案是:

task foo {
  ant.get(src: 'http://.../file.zip', dest: 'somedir', skipexisting: 'true')
  ant.unzip(src: 'somedir' + '/file.zip', dest: 'unpackdir')
}
Run Code Online (Sandbox Code Playgroud)

不过,我期待无蚂蚁解决方案.有机会实现这一目标吗?

http unzip download gradle

27
推荐指数
5
解决办法
2万
查看次数

如何以编程方式使用R提取或解压缩.7z(7-zip)文件

我正在尝试自动提取用7-zip压缩的大量文件.我需要自动化这个过程,因为a)我想要解锁多年的数据和b)我想与其他人分享我的代码,并防止他们手动重复这个过程.

我的计算机上安装了WinRAR和7-zip,我可以使用任一程序轻松打开这些文件.

我环顾四周unzip untarunz命令,但我不相信他们中的任何一个都能满足我的需求.

我对压缩一无所知,但如果它有任何区别:这些文件中的每一个只包含一个文件,它只是一个文本文件.

我非常喜欢不需要用户安装其他软件(如WinRAR或7-Zip)并执行命令的解决方案shell,尽管我承认只有R和CRAN软件包可能无法执行此任务.我实际上相信shell.exec使用其他参数运行这些文件可能适用于安装了WinRAR的计算机,但同样,我希望尽可能避免安装.:)

运行下面的代码将加载我试图提取的文件 - .7z文件files.data是需要解锁的.

# create a temporary file and temporary directory, download the file, extract the file to the temporary directory
tf <- tempfile() ; td <- tempdir()
file.path <- "ftp://ftp.ibge.gov.br/Orcamentos_Familiares/Pesquisa_de_Orcamentos_Familiares_2008_2009/Microdados/Dados.zip"
download.file( file.path , tf , mode = "wb" )
files.data <- unzip( tf , exdir = td )

# how do i unzip ANY of these .7z …
Run Code Online (Sandbox Code Playgroud)

zip r 7zip unzip rar

26
推荐指数
2
解决办法
1万
查看次数

使用golang解压缩文件的简便方法

有没有一种简单的方法用golang解压缩文件?

现在我的代码是:

func Unzip(src, dest string) error {
    r, err := zip.OpenReader(src)
    if err != nil {
        return err
    }
    defer r.Close()

    for _, f := range r.File {
        rc, err := f.Open()
        if err != nil {
            return err
        }
        defer rc.Close()

        path := filepath.Join(dest, f.Name)
        if f.FileInfo().IsDir() {
            os.MkdirAll(path, f.Mode())
        } else {
            f, err := os.OpenFile(
                path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.Mode())
            if err != nil {
                return err
            }
            defer f.Close()

            _, err = io.Copy(f, rc)
            if err != …
Run Code Online (Sandbox Code Playgroud)

zip unzip go

26
推荐指数
2
解决办法
2万
查看次数

Bash - 如何解压缩管道zip文件(来自"wget -qO-")

有关如何解压缩管道zip文件的任何想法,如下所示:

wget -qO- http://downloads.wordpress.org/plugin/akismet.2.5.3.zip
Run Code Online (Sandbox Code Playgroud)

我希望将文件解压缩到一个目录,就像我们以前使用普通文件一样:

wget -qO- http://downloads.wordpress.org/plugin/akismet.2.5.3.zip | unzip -d ~/Desktop
Run Code Online (Sandbox Code Playgroud)

bash wget unzip xargs

24
推荐指数
6
解决办法
3万
查看次数

自动解压缩文件夹中的文件[mac os x]

我的桌面上有一个文件夹,里面有大约2500个文件夹,每个文件夹中都有多个压缩文件,我可以通过手动点击它们解压缩它们,有没有办法通过终端自动完成?

terminal unzip

23
推荐指数
2
解决办法
3万
查看次数

如何使用C#4.0从文件夹解压缩所有.Zip文件,而不使用任何OpenSource Dll?

我有一个包含.ZIP文件的文件夹.现在,我想使用C#将ZIP文件解压缩到特定文件夹,但不使用任何外部程序集或.Net Framework 4.5.

我搜索过,但没有找到任何使用Framework 4.0或更低版本解压缩*.zip文件的解决方案.

我尝试过GZipStream,但它只支持.gz而不支持.zip文件.

c# unzip zipfile

21
推荐指数
2
解决办法
7万
查看次数

在unix中解压缩密码保护的zip

我需要创建一个shell脚本,其中我将解压缩受密码保护的zip文件.我知道密码,需要自动化解压缩过程.

如何使用Unix shell脚本实现这一目标?

unix shell unzip

21
推荐指数
4
解决办法
4万
查看次数

如何在不解压缩的情况下在Gvim中打开gzip文本文件?

如何在Gvim中打开Gzip文本文件(*.gz)而不先解压缩它们?

vim gzip unzip

20
推荐指数
2
解决办法
3万
查看次数

在zip存档中打印多个文件的内容

我有一些zip非常大的文件,我想打印它们而不先提取.我正在使用zcatzless执行此操作,然后将输出重定向到其他应用程序.当我的zip文件包含多个文本文件时,我收到以下错误:

zcat tweets.zip >a
gzip: tweets.zip has more than one entry--rest ignored
Run Code Online (Sandbox Code Playgroud)

如何使用zip包含多个文本文件的文件执行我想要的操作?

linux compression zip unzip

20
推荐指数
2
解决办法
2万
查看次数

标签 统计

unzip ×10

zip ×3

download ×2

7zip ×1

android ×1

bash ×1

c# ×1

compression ×1

go ×1

gradle ×1

gzip ×1

http ×1

linux ×1

r ×1

rar ×1

shell ×1

terminal ×1

unix ×1

vim ×1

wget ×1

xargs ×1

zipfile ×1