mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
open zip file has error with the zip date in file has a offset #56
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andyhebear on GitHub (Aug 31, 2015).
i wite a file with a head pack and then wite the zip file after,but when i read this file to seek the zip date start position,then throw error!!!
@adamhathcock commented on GitHub (Aug 31, 2015):
More detail or a sample would be great
@andyhebear commented on GitHub (Aug 31, 2015):
i write a recorder data ,then i need some file info in file head
public const string IRQ_RECODER_HEARD = "therecoder";
like code:
// the file header
public class RecoderHeader {
public string RECODER_HEARD = IRQ_RECODER_HEARD;
const int HEAD_LENGTH=1024*4+32;
private static byte[] CreateHead() {
private static bool ReadHeadInfoFromFile(string recordzipfilepath, out FileStream fs) {
bool ok = false;
fs = new FileStream(recordzipfilepath, FileMode.Open, FileAccess.Read, FileShare.Read);
{
//read head info
BinaryReader br = new BinaryReader(fs);
{
ok = ReadHeadInfo(br);
if (ok) {
//readScore(br);
}
}
}
return ok;
}
///
@andyhebear commented on GitHub (Aug 31, 2015):
the save like:
public static bool SaveToZFile(string filename) {
}
@andyhebear commented on GitHub (Aug 31, 2015):
the code is long in my project,
the sample
save file:
1:write headdata
2:write compress data
and the read the save file
1: read headdata,and the stream has a position
2: read compress data in filestream and decompress ,and then throw error...
@adamhathcock commented on GitHub (Aug 31, 2015):
Sorry, this is not making any sense to me.
Give me a valid zip file that errors out when SharpCompress reads it.
@andyhebear commented on GitHub (Sep 14, 2015):
//ok! I write a test again:
// please test
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using SharpCompress.Archive;
using SharpCompress.Archive.Zip;
using SharpCompress.Common;
namespace SharpCompress
{
static class _TestSharpCompress
{
public static void Main(string[] args) {
}
//
https://github.com/RainsSoft/sharpcompress/blob/master/SharpCompress/ziptest.zip
you can uncompress "ziptest.zip" to ziptest dir,and run this test
https://github.com/RainsSoft/sharpcompress/blob/master/SharpCompress/mypack.data.zip
the compress file "mypack.data.zip" you can open in winrar.exe,but in this test cann't read!!!!
the code you can find in:
https://github.com/RainsSoft/sharpcompress/blob/master/SharpCompress/_TestSharpCompress.cs
..
@andyhebear commented on GitHub (Sep 14, 2015):
the compress file "mypack.data.zip" you can open in winrar.exe,but in this test cann't read!!!!
i think the ZipArchive load the stream with not support in a start postion