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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:31:42+00:00 2026-05-23T02:31:42+00:00

I have a byte array. It contains 24 bit signed integers stored lsb to

  • 0

I have a byte array. It contains 24 bit signed integers stored lsb to msb. The array could hold up to 4mb of data. The integers will be converted to 32 bit signed integers to be used in the application. I would like to hear about possible strategies for conversion and sampling of this data.

One thing I need to do with the data is graph it. With sequential sampling, I am worried about loosing some of the important peaks and valleys in the data. I also want to do some calculations to determine the highest and lowest values.

Given what I need to do, are there any algorithms or ways of doing things that will help me achieve my goal quickly and efficiently?

  • 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-23T02:31:43+00:00Added an answer on May 23, 2026 at 2:31 am

    If your input has to be 3 byte ints, then you can convert to 4 byte ints as follows:

    byte[] input = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9}; //sample data
    byte[] buffer = new byte[4]; //4 byte buffer for conversion from 3-> 4 byte int
    int[] output = new int[input.Length / 3];
    
    for (int i = 0, j = 0; i < input.Length; i += 3, j++)
    {
        Buffer.BlockCopy(input, i, buffer, 0, 3);
    
        int signed32 = BitConverter.ToInt32(buffer, 0);
    
        output[j] = signed32;
    }
    

    Edit

    Fixed block copy for little endian.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a byte[] array received in TCP Client.The array contains a 24-bit RGB
I have a SQL database that contains images stored as a byte array. I
I have a 128-byte (1024-bit) modulus (in a byte array format) and my exponent
I have a byte array which contains an image fetched from the net. I
I have a byte array that contains 6 bytes last 2 represents the port
If I have a byte array that contains UTF8 content, how would I go
I have a byte array in java. That array contains '%' symbol somewhere in
I have byte array as input. I would like to convert that array to
I have a byte array in memory, read from a file. I would like
I have a byte[] array, the contents of which represent a TIFF file (as

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.