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 7178469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:55:37+00:00 2026-05-28T16:55:37+00:00

In my project I need to know what a zlib header looks like. I’ve

  • 0

In my project I need to know what a zlib header looks like. I’ve heard it’s rather simple but I cannot find any description of the zlib header.

For example, does it contain a magic number?

  • 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-05-28T16:55:39+00:00Added an answer on May 28, 2026 at 4:55 pm

    Link to RFC

    0   1
    +---+---+
    |CMF|FLG|
    +---+---+
    

    CMF (Compression Method and flags)
    This byte is divided into a 4-bit compression method and a 4-
    bit information field depending on the compression method.

    bits 0 to 3  CM     Compression method
    bits 4 to 7  CINFO  Compression info
    

    CM (Compression method)
    This identifies the compression method used in the file. CM = 8
    denotes the "deflate" compression method with a window size up
    to 32K. This is the method used by gzip and PNG and almost everything else.
    CM = 15 is reserved.

    CINFO (Compression info)
    For CM = 8, CINFO is the base-2 logarithm of the LZ77 window
    size, minus eight (CINFO=7 indicates a 32K window size). Values
    of CINFO above 7 are not allowed in this version of the
    specification. CINFO is not defined in this specification for
    CM not equal to 8.

    In practice, this means the first byte is almost always 78 (hex)

    FLG (FLaGs)
    This flag byte is divided as follows:

    bits 0 to 4  FCHECK  (check bits for CMF and FLG)
    bit  5       FDICT   (preset dictionary)
    bits 6 to 7  FLEVEL  (compression level)
    

    The FCHECK value must be such that CMF and FLG, when viewed as
    a 16-bit unsigned integer stored in MSB order (CMF*256 + FLG),
    is a multiple of 31.

    FLEVEL (Compression level)
    These flags are available for use by specific compression
    methods. The "deflate" method (CM = 8) sets these flags as
    follows:

            0 - compressor used fastest algorithm
            1 - compressor used fast algorithm
            2 - compressor used default algorithm
            3 - compressor used maximum compression, slowest algorithm
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm investigating using MSMQ for my team's new project but I need to know
Hey, I'm really stuck with my project here... I need to know when any
I'm now developing a home project, but before I start, I need to know
For my project i need to use the jQuery Rule Plugin Its looks like
for a data warehouse project I need to know about some best practices regarding
I need to know, what renderer has been used in the Sintel project. I
I have a logging project , i need to know how to build a
I am doing a project, for which I need to know all the wikipedia
I'm working in a C++ unmanaged project. I need to know how can I
Hi i am doing a small project in C#, and i need to know

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.