简体   繁体   English

我可以在不使用任何库的情况下(不用.net zip类)在c#中以编程方式创建zip文件(未压缩)吗?

[英]Can i create zip file (uncompressed) programatically in c# without using any library (without .net zip classes)

I was looking to understand the structure of the zip file and thinking of creating my own zip library which will be able to zip some files without any compression. 我一直想了解zip文件的结构,并想创建自己的zip库,该库将能够压缩某些文件而无需进行任何压缩。 Although there are couple of other libraries already exist in .net and third party also which can do that, but I am looking to do it by my own. 尽管.net和第三方中已经存在其他一些库,它们也可以做到这一点,但是我希望自己完成。

I started reading the structure of the zip document : 我开始阅读zip文档的结构:

https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html

Althought it explains me little bit about the zip structure but did anyone already tried to create zip file from the very scratch (ie from bit by bit) 尽管它向我解释了有关zip结构的一些信息,但是有没有人尝试过从头开始创建zip文件(即一点一点地创建)

Its not just a question but an open discussion on how to create a zip file bit by bit from your own code in c# (or in other similar language) 它不仅是一个问题,而且是一个公开讨论,内容涉及如何使用c#(或其他类似语言)从自己的代码中一点一点地创建一个zip文件。

There is a GZipStream class in System.IO.Compression that allows to zip streams using Gzip. System.IO.Compression中有一个GZipStream类,允许使用Gzip压缩流。 As far as I know this is the only class for compression in the BCL . 据我所知,这是BCL中唯一的压缩类。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我想在zip文件中没有任何目录的zip文件。我怎么能在c#中做 - I want zip file without any directories in zip file.How can I do in c# 在C#中创建未压缩的Zip - Create Uncompressed Zip in C# 如何使用C#4.0从文件夹解压缩所有.Zip文件,而不使用任何OpenSource Dll? - How to Unzip all .Zip file from Folder using C# 4.0 and without using any OpenSource Dll? C#Asp.Net创建文本文件,压缩并保存到Blob - 无需向磁盘写入任何内容 - C# Asp.Net Create text file, zip it, and save to Blob - Without writing anything to disk 使用sevenzip库C#部分创建7zip文件 - Create 7zip file in parts using sevenzip Library c# 如何使用C#.NET 4.5将文件从ZIP存档读取到内存而不首先将其解压缩到文件中? - How to read file from ZIP archive to memory without extracting it to file first, by using C# .NET 4.5? 在不使用 webclient c# 的情况下下载 zip 文件 - Download zip file without using webclient c# 如何使用C#从zip文件夹中读取文件而不在asp.net 2中解压缩 - How to read file from zip folder without extracting in asp.net 2 using C# C# - 如何使用 7-zip 库(即不是 a.7z,而是.zip)创建常规 ZIP 存档? - C# - How do I create a regular ZIP archive using the 7-zip library(i.e. not a .7z, but .zip)? 我如何检查压缩格式的文件(所有格式-zip / rar / tar / uue)是否受密码保护,而无需在C#中解压缩? - how can i check if a compressed file(of all formats- zip/rar/tar/uue) is password protected, without extracting it in c#?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM