Skip to content

How do I use the same template to read different buffers? #27

Open

Description

@r03ert0

I am using struct to write the header of binary files. If the struct template is Header, is it ok to do:

Header.allocate();
var data1=Header.buffer();

fill data1 with my settings, and then do again

Header.allocate();
var data2=Header.buffer();

to create file number 2?

Activity

  1. xdenser commented on Aug 21, 2016

    @xdenser
    Owner

    There is no sense to call allocate twice on same instance. Reuse old buffer, create new instance, or use _setBuffer method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions