Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:51:37+00:00 2026-06-07T05:51:37+00:00

This is what I have: byte[] buff = new byte[1]; byte[] buffer = {

  • 0

This is what I have:

        byte[] buff = new byte[1];
        byte[] buffer = { 10, 20, 30, 40 };
        Stream data = new MemoryStream();            
        data.Write(buffer, 2, 2);
        data.Position = 0;
        InflaterInputStream _inflater;            
        _inflater = new InflaterInputStream(data);
        int count = _inflater.Read(buff, 0, 1);

It throws SharpZipBaseException: Header checksum illegal and unexpected EOF exception, and data.Position is 2 by the end.

Can anyone tell me what might be the problem and how to fix it? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:51:38+00:00Added an answer on June 7, 2026 at 5:51 am

    InflaterInputStream expects the data to be in the “deflate” format. You’ve only written two bytes of data, which isn’t a valid “deflate” file.

    Put it this way – if you gave WinZip some random blob of two bytes and asked it to unzip that, what would you expect it to do?

    The error message is pretty clear here: your file isn’t long enough (unexpected EOF exception) and starts in the wrong way for the file form (Header checksum illegal). When in doubt, always look at the error message and think about why you’d be getting that error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this hexadecimal data: byte[] data = new Byte[] { 0xC1, 0x3A, 0x00,
I have this code byte[] b = new byte[]{-33,-4,20,30}; System.err.println(Arrays.toString(b)); int x = (b[0]
I have this byte code: new java.lang.Object // stack is [newObjectRef] dup // Stack
I am reading a file byte-by-byte. Say for example i have this byte: 0x41
I have a byte array and I need to convert this to a image.
I have this function in C# to convert a little endian byte array to
I have this method: scala> def foo(traversable: Traversable[{def toByte: Byte}]) = { | traversable.map(_.toByte)
Possible Duplicate: WPF Image to byte[] Relative to this I have a BitmapSource image
This is a followup to my last question . I now have a byte[]
I have an image byte[] , this byte[] is coming from LDAP [Oracle Open

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.