Menu

mount zip file

zeroin23
2008-09-28
2012-11-13
  • zeroin23

    zeroin23 - 2008-09-28

    I have a NTFS with 64k cluster, not wanting to waste space, i usually keep all my text files in a zip file. is it possible to mount it in notepad++?

    (concept is like foobar able to mount and play mp3 within rar files).

    thank you

     
    • Sune Marcher

      Sune Marcher - 2008-09-28

      Just how many .txt files do you have, and how small is the partition with 64kb clusters? I know if feels bad to waste space, but you have to ask yourself...

      *) how much space do you really waste?
      *) how useful would the feature be in general?
      *) how much work would it be implementing it (especially consider support for saving, not just read-only)

       
      • zeroin23

        zeroin23 - 2008-09-29

        *) how much space do you really waste?

        53files
        size 128,601byte
        size on disk 290,816byte

        zipfile 63,166byte

        290,816/63,166=4.604 factor

        *) how useful would the feature be in general?

        mhmm other uses that i could think of might be accessing archive of applications log files.

        directly accessing source codes files such as NppExec_025_src.zip.

        *) workwise

        even though zip libraries are commonly available, i guessed it might be difficult to integrate directly into the editor. Maybe it could spawn its' life as a plug-in first.

         
        • Sune Marcher

          Sune Marcher - 2008-09-29

          Well, 4.6x factor might sound like a lot, but to computer wasted space, you really need to look at it this way... and let us throw in a harddisk size just for fun, since you seem to like ratios :)

          (size_on_disk - size) / disk_size

          In order to get some not ridiculously small numbers, let use assume 10.000 files 1KB size on a partition with 64KB clusters, and a (very small by today's standard) 80gig harddisk. We get...

          (10.000*65.536 - 10.000*1024)/80.000.000.000 , or about 0.81% disk space wasted. IMHO the gains for this hypothetical example doesn't justify the coding effort.

          Adding efficient save support of files within zip files is non-trivial, you'll end up either with internal file fragmentation, or the need to "defrag" the files.

          Perhaps read-only support would make sense for archiving huge log files, but are you going to *edit* those? And remember that NP++ isn't really very efficient with huge files. You'd probably be better suited with a specialized compressed-logfile-grepper application.

          Obviously it's up to Don what he wants to support, I'm just trying to speak a voice of reason here :)

           
          • Don HO

            Don HO - 2008-09-29

            What I see is a plugin (which can be use zlib) provide a panel to display file tree in a zip file. Double click on a listed file will extract this file in the  sub-tmp directory and open it in Notepad++.

            Yes, it's a interesting feature and plugin project. However I don't see myself to implement this plugin since I'm busy on the other things right now.

            Don

             
    • Harry

      Harry - 2008-09-29

      Imo, an application such as WinRAR properly suppports extracting a file, launching an editor and then repacking if the file were to be changed. I use it alot and it works wonderfully (there are probably tons of ZIP applications that can do this).

      As for plugins, I think it is pretty difficult to do this, since there are currently no means to tell notepad++ to load other data than the direct binary ones.