Code Monkey home page Code Monkey logo

bytebuffer-cpp's Introduction

Hi there ๐Ÿ‘‹

bytebuffer-cpp's People

Contributors

ramseyk avatar

Watchers

 avatar

Forkers

fenggui321

bytebuffer-cpp's Issues

Is this a bug?

Hi Kant:
  at the beginning I want to thank you for your great job !! Thanks for you share it.
  When i use the ByteBuffer ,I notice the function 

  void putBytes(uint8_t*b uint32_t len,uint32_t index)
  {
        wpos = index;      // is there a bug? 
        ... ...            // althought the next append increase the wpos
                           // 
  }

  e.g. when the wpos value is 1024. invoke the function putBytes("1",1,10)
      the wpos changed to 11, and the left 1024-11=1013 will be invaild. 

  may be the foo insert also have this problem.




Original issue reported on code.google.com by [email protected] on 26 Jun 2013 at 6:35

About some methods

Hi, thank you for the class.

I am trying to convert to c++ piece of Java code using ByteBuffer:

        ByteBuffer buffer = ByteBuffer.allocate(4 + 4 + 4 + bytes.length);
        buffer.putInt(MAGIC);
        buffer.putInt(header);
        buffer.putInt(bytes.length);
        buffer.put(bytes); // <------- absent 
        buffer.flip();     // <------- absent

I am using putBytes instead of put(bytes). But what need to use instead of 
flip() ? 


Original issue reported on code.google.com by [email protected] on 29 Aug 2013 at 9:41

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.