Question on ResourceZipFile buffer

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Question on ResourceZipFile buffer

      Hi,

      I am now at the chapter on loading and caching game data.
      In the ResourceZipFile class, there is a VGetRawResource method which takes in a char* buffer.

      Inside the method, there is a char* buffer which is used as an argument to the ReadFile method which has a parameter of type void*.

      I would like to know why is a char* type used to store the contents of a zip file?
      Does the zip file contain a series of characters ?
    • RE: Question on ResourceZipFile buffer

      char* is commonly used for raw data because a char is exactly 1 byte. This makes the math a lot easier when you're dealing with offsets.

      -Rez