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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:59:24+00:00 2026-05-31T00:59:24+00:00

I create a NSData and use the function – (const void *)bytes; So, it

  • 0

I create a NSData and use the function

- (const void *)bytes;

So, it return the bytes in a const void * variable. If I read the memory manually I will find this:

98 F3 00 76 84    //Then a lot of zero

Use strlen not work because the 00. But it will be aways the same size: 10 hexa lenght. So, to create a manually size_t, I will use:

size_t mysize = 0x0A

Or I have use the size in bits:

size_t mysize = 0x28

Is any of this correct?

  • 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-31T00:59:25+00:00Added an answer on May 31, 2026 at 12:59 am

    The NSData contains the length.

    const void *mybytes = [data bytes];
    size_t mysize = [data length];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my app I create and use a normal persistent store: - (NSPersistentStoreCoordinator *)
I've loaded an XML file as NSData into memory and parse over the elements
i have a string that I use to create a file. I now need
I have some opaque bytes which I want to use in an std::map ,
Is this the right way? // convert const void *buffer = NULL; size_t size
In the drawrect function of a UIView I use CGContext to draw some shapes.
I get this warning in Xcode warning: Attempting to create USE_BLOCK_IN_FRAME variable with block
create table person ( name varchar(15), attr1 varchar(15), attr2 varchar(1), attr3 char(1), attr4 int
Create a flat text file in c++ around 50 - 100 MB with the
Create a file called Valid[File].txt and stick some text in it. Start powershell and

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.