V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
undeflife
V2EX  ›  iDev

请问如何在不把文件完全下载到本地的情况下预览 ftp 或 smb 共享的 zip 的文件列表及文件内容

  •  
  •   undeflife · Apr 5, 2015 via iPad · 3405 views
    This topic created in 4051 days ago, the information mentioned may be changed or developed.
    想实现类似comicshare和android下的prefectviewer阅读漫画的效果
    Supplement 1  ·  Apr 5, 2015
    iOS上…
    3 replies    2015-04-05 22:08:24 +08:00
    ryd994
        1
    ryd994  
       Apr 5, 2015
    ssh上去解压……
    zip打了包就没办法了
    lilydjwg
        2
    lilydjwg  
       Apr 5, 2015
    你去尾部读到文件列表,然后想要哪个文件就去中间取。比如:

    $ tail -c 90K < ~/文档/编程/Python/python-3.4.zip > part.zip
    $ python3
    >>> import zipfile
    >>> z = zipfile.ZipFile('part.zip')
    >>> z.namelist()

    FTP 应该会比较慢,因为每次数据传输都要新建一个TCP连接。SMB不清楚。如果可以seek就好办了。
    est
        3
    est  
       Apr 5, 2015 via Android   ❤️ 1
    zip文件有个toc在头部,记录有offset
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5384 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 07:17 · PVG 15:17 · LAX 00:17 · JFK 03:17
    ♥ Do have faith in what you're doing.