Large scale bit-shifting

Are there any libraries or reccomended techniques foir large-scale bit-shifting.
I have a byte array (about 100KB). In the middle of the array, I need to insert 13 bits, and shift everyhting after those bits. The file format is not byte-aligned.
Is there a "good" way to do this?
Thanks,
-Micah

mtf wrote:
Are there any libraries or reccomended techniques foir large-scale bit-shifting.
I have a byte array (about 100KB). In the middle of the array, I need to insert 13 bits, and shift everyhting after those bits. The file format is not byte-aligned.
Is there a "good" way to do this?I don't know of a library to do this, but it's pretty straightforward to implement, so long as you're clear about which end of the byte you consider to be the beginning (i.e., does the bit stream begin with bit 0 or bit 7 of a byte).

Similar Messages

  • Line appears when applying drop shadow on large scale

    Hello!
    Some weeks ago I had to make a large scale graphic (800mmx2000mm) for a roll-up banner. I wanted to apply a drop shadow to a rounded shape, and ugly lines came up. Since it was a bit urgent, I decided not to use it.
    But now I'm curious, so I quickly made an ellipse and added a shadow, so you know what I mean. This also happens when I save it as pdf or image.
    Perhaps someday I will have to use a drop shadow on large scale. So, does anybody knows how to fix this or what could I do in case I need to use this effect in these conditions? I use Illustrator CS6 in Mac with Mavericks.
    Thanks in advance.

    Mike Gondek wrote:
    I was able to create an ellipse to your dimension and got a good drop shadow. What happens if you manually make a drop shadow using appearance?
    FYI I tried making the same using drop shadow filter in CS5 and got this error.
    Incase your file was created in CS5 and opened in 6, I would recreate the drop shadow in CS6. I know they redid the gaussian blur in CS6, but not sure if that affected drop shadow.
    CS6 is better on raster effects at large sizes.
    My file was created and opened in CS6.
    My ellipse is around 175cmx50cm. I tried it manually like you said and got the same results:
    So, I guess I'm alone with such a problem. No idea what is wrong :/

  • Expression node bit shift

    Is this a bug or am I just thinking about this wrong?  The attached VI shows a U8 going through an expression node where the expression is "x << y".  I've tried multiple versions of y and as soon as y becomes large enough to shift all the original 1's off the U8, the result becomes 0xFF instead of 0x00.  I would assume that its intent was to match C's functionality since it matches C's syntax but this does not appear to be the case.
    Any suggestions or is this a bug?
    Thanks
    Andy Brown
    Averna
    Attachments:
    expression_shift_issue.vi ‏11 KB

    Hey Andy,
    Thank you for contacting National Instruments.  It does look like that is acting strangely.  However, we do have a Logical Shift VI that I believe accomplishes what you are looking for.
    On the Block Diagram, go to Programming>>Numeric>>Data Manipulation>>Logical Shift.
    It takes two inputs, x and y, with x being the original number, and y being the number of bits you want to shift.  It looks like it will clear out to 00 once all the bits have been shifted over.
    Let me know if you any questions!
    Regards,
    Kevin H
    National Instruments
    WSN/Wireless DAQ Product Support Engineer

  • Has anyone ever used web start in large scale ?

    Dear friends,
    have you ever used some web start application in large scale ?
    i.e., have you distributed some real application with web-start?
    I�m doing such experience here and I�m a bit afraid about several problems in the final user machine - such as java version, browser incompatibility and mainly with the ugly WebStart cache problems.

    can you give a bit more detail on what exactly you're afraid of? is this a www application? internal business app? etc.
    for example you can force your java version in java web-start,etc...

  • ELearning for Large Scale System Change

    Our next project is training for a large scale company wide system upgrade. Our users are very dependent on the software that will be replaced and several departments will need to learn their job anew. Any suggestions on how to use eLearning to increase adoption and comprehension of the new software?

    Hi Lincoln,
    I've worked on a number of large-scale IT change projects for international clients. I can make a few suggestions, some Captivate related, some more general eLearning related.
    On projects like this I tend to produce three types of training: face-to-face, interactive tutorials/simulations & job aids. Ideally the three are planned together, allowing you to create a single instructional design plan. You want people to be introduced to the system, learning to be reinforced and then everybody to be supported.
    The face-to-face training usually contains lots of show and tell, where the users are shown how to do tasks and then have a go at doing this themselves. Ideally a number of small tasks are shown and repeated, then they are all brought together by getting the learners to follow realistic scenarios that require all of the discrete tasks to be performed together. I find that lots of training doesn't integrate deeply with people's real-life jobs and the use of real world scenarios helps to improve retention and performance. I have made materials where the show-and-tell pieces have been pre-recorded, which you can do with Captivate.
    The interactive tutorials are usually used as follow-on material to the face-to-face modules, allowing learners to go through simulations with guidance when they do something unexpected, though sometimes there is no face-to-face training and the interactive tutorials have to deliver all of the teaching. Sometimes these include sections that merely show users and ask questions afterwards. Sometimes they become very complex branching scenarios. I usually build all of this in Captivate, though I do find it quite buggy and frustrating at times.
    Finally, I build small job aids. These are very specific and show how to do a well defined function, such as changes an existing customer's address. Sometimes these are Captivate movies, sometimes they are PDF files, often they are implemented as both. They can be embedded and/or linked from the system help screens and FAQs, as well as used in support responses and post-training emails. The movies tend to be short and sweet: 30-120 seconds long.
    In an ideal world the number of job aids grows rapidly after implementation in response to user support requests, though in reality I often have to anticipate what users are going to find difficult and create all of these prior to launch.
    If you are going to use Captivate for your project, then I suggest that you test, test and test again before agreeing what you will deliver. It's a great bit of software, in theory, but it is quite buggy. I'm working on a project with CP6.1 and I'm having lots of audio synch problems and video corruption issues publishing my final work to as MP4 videos.
    In terms of effort, my rule of thumb is 20% planning, 60% design and scripting and 20% implementation.
    I hope this helps,
    David

  • Is it possible to simulate large-scal​e non-linear systems using the Simulation Toolkit?

    Hi,
    I am new to LabVIEW, having used Matlab/simulink for a few years. I am trying to simulate a relatively complex non-linear vehicle model. In Matlab/Simulink I would use an m-file to describe the system equations (i.e. x1_dot=..., x2_dot=..., etc.). Is there a similar method in LabVIEW? I have got a simple simulation running using the 'eval formula node', a very ungainly method of substituting variables, and an integrator in a 'simulation node'. It takes about an hour to run a simulation that takes 3 seconds in Matlab. I just need to know if it is realistic to do large-scale simulations in LabVIEW, or if it was not designed for that and I should persuede the management to go
    back to Matlab!!!
    If it is possible, where can I find help on the subject? I have spent a long time looking on the web and come up with very little.
    Many thanks in advance,
    Paul.

    If these are simple differential equations, easiest would be a for loop with a bunch of shift registers, one for each x1, x2, etc. containing the current values.
    In your case, you would calculate all the derivatives from the instantaneous values inside the loop, then add them to each value before feeding them to their respective shift register again.
    The attached very simple example shows how to generate an exponential decay function using the formula dx/dt= kx (and k is negative). The shift register in initialized with the starting condition x=1.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    DiffEQ.vi ‏33 KB

  • Hi, My printing has suddenly changed in adobe to a large scale, as in, what should be one page of print comes out as 24 pages?   I havent changed anything, its happening on more than one document also, I have to stop my printer before all the pages spew o

    Hi, My printing has suddenly changed in adobe to a large scale, as in, what should be one page of print comes out as 24 pages?   I havent changed anything, its happening on more than one document also, I have to stop my printer before all the pages spew out. I have tried printing 'one single page' and it does exactly the same? Help?

    Is the Poster Print feature turned ON?

  • When printing from an online PDF, the page prints in extra large scale. How do I fix this?

    when printing from an online PDF, the page prints in extra large scale. How do I fix this?

    This can happen when Firefox has misread the paper size from the information supplied by Windows. Clearing it can involve finding some obscure settings, but here goes:
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the search box above the list, type or paste '''print''' and pause while the list is filtered
    (3) For each setting for the problem printer, right-click and Reset it. The fastest way is to right-click with the mouse and then press the r key on the keyboard with your other hand.
    Note: In a couple other threads involving Brother printers, the preference '''printer_printer_name.print_paper_data''' was set to 256 and when the user edited it to 1 that fixed the paper size problem. If you see a 256 there, you can edit the value by doubling-clicking it or using right-click>Modify.

  • Issue with bit shifting

    Hi everyone!
    I have a question about bit shifting. When I attempt to shift 32 bit on a int value, the output is the same value. It doesn't matter if I try to make a rigth or left shifting. It also hapend when I make 64 bit shifting on a long value. I supposed it should be 0. This is the code I'm woking with:
    int x = 2147483647;
    System.out.println("Output1 = " + (x >> 32));
    System.out.println("Output2 = " + (x << 32));
    Output:
    Output1 = 2147483647
    Output2 = 2147483647
    Could someone help me to understand why this happend?
    Thanks in advance.

    GerSua wrote:
    Hi everyone!
    I have a question about bit shifting. When I attempt to shift 32 bit on a int value, the output is the same value. It doesn't matter if I try to make a rigth or left shifting. It also hapend when I make 64 bit shifting on a long value. I supposed it should be 0. This is the code I'm woking with:
    int x = 2147483647;
    System.out.println("Output1 = " + (x >> 32));
    System.out.println("Output2 = " + (x << 32));
    Output:
    Output1 = 2147483647
    Output2 = 2147483647
    Could someone help me to understand why this happend?
    Thanks in advance.It is supposed to work this way. I know that's not alot of info, but you have not discovered a bug or anything like that.

  • Bit Shifting Help

    Hi,
    I'm not too familiar with bit shifting. If anyone can help with this problem, it would be great!
    We have words that are 32 bits. So, basically, the lower 8 bits should have value �1� and the upper 24 bits should have value �X�. For our example, lets say 5. How do you manipulate integers to get this format? So, I assume it will look like below.
    31 87 0
    00000000010100000001

    int i = 0x12345678;
    byte highOrder = (byte)(i >> 24);
    byte second = (byte)(i >> 16);
    byte third = (byte)(i >> 8);
    byte lowOrder = (byte)i;

  • Tweaking product prices on a large scale - how?

    My Client has a software store on BC. His supplier is constantly changing their prices and my client wants to be able to quickly review prices, make changes to reflect supplier prices every few days
    If I export the Product List the Excel export is unusable with it full of HTML markup from the product descriptions.
    Apart from opening each product individually to check and tweak prices how is everyone ammending prices on a large scale.... My client only has 60 products at the moment but this is soon to quadruple and I have prospective clients looking at BC for their ecommerce solution and they have thousands of items.
    Regards
    Richard

    If its just prices you want to input, see if you can just eliminate all the other columns that are not needed and only import the price column with its product identifier ofcourse, and see if it will just update the price and not have to deal with the descriptions...Just a thought...

  • What design aids for large-scale application (using LV6i) exist?

    I have a large-scale application that includes analog and digital I/O, motion control, multiple temperature readings, Ethernet communication, RS-232, DDE and ActiveX controls for communicating with other commercial software. We have to improve the system performance and ease the pain of maintaining and upgrading. What aids are there for large-scale application design and development?

    This doesn't exactly count as development "tools" but I can send you copies of three papers that I found when I was just getting started with LV. They can show you how to think about your problem--and that is really the hardest (and most important) part.
    Contact me directly and I'll email them to you. The archive is to large to post.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Problems with bit shift left in Formula Node

    Hi,
    Sorry but my English is not good.
    I'm trying to execute a bit shift left in the Formula Node, but the shift left is not working as I expected.
    uInt32 parametro[5];
    float32 valorAmostra;
    int16 indiceAmostra;
    uInt8 indiceResposta;
    int16 controle;
    int32 valor;
    int8 i;
    for(i=0; i<5; i++)
    parametro[i]=param[i];
    valor = parametro[5]<<16 | parametro[4]<<8 | parametro[3];
    controle = parametro[1]<<8 | parametro[0];
    indiceAmostra = (controle & 0x3FF);
    indiceResposta = (controle >> 10);
    valorAmostra = valor & 0x7FFFFF;
    valorAmostra = valorAmostra*(2.4/8388607);
    if((valor & 0x800000) == 0x800000)
    valorAmostra = valorAmostra*(-1);
    the input param array is of the type uInt8, as I saw in other topics that does not shift with uInt8,
    I copy the values of param array to parametro which is of type  uInt32, but still did not work.
    Testing the input param with the following values:
    param[] = {10,14,10,0,16}
    the valorAmostra returned is 0,00117188 when he should be 0,300003.
    Can someone help me please?
    Solved!
    Go to Solution.

    Portuguese:
    Olá,
    Existe um bug no LabVIEW para esta operação. Este bug deverá ser corrigido em versões futuras. Uma solução para esta situação é utilizar um int32 ao invés de um ulnt32.
    Qualquer dúvida por favor entre em contato.
    Obrigado.
    English:
    I investigated the problem you are having, and it turns out that it is a bug that has already been reported and documented. The work around for it is to use int32 rather than uInt32.
    Thanks.
    Luciano Borges
    R&D Engineer
    Pirelli Brazil

  • Large Scale Digital Printing Guidelines

    Hi,
    I'm trying to get a getter handle on the principles and options for creating the best large and very large scale prints from digital files.  I'm more than well versed in the basics of Photoshop and color management but there remain some issues I've never dealt with.
    It would be very helpful if you could give me some advice about this issue that I've divided into four levels.  In some cases I've stated principles as I understand them.  Feel free to better inform me.  In other cases I've posed direct questions and I'd really appreciate professional advice about these issues, or references to places where I can learn more.
    Thanks alot,
    Chris
    Level one – Start with the maximum number of pixels possible.
    Principle: Your goal is to produce a print without interpolation at no less than 240 dpi.  This means that you need as many pixels as the capture device can produce at its maximum optical resolution.
    Level two – Appropriate Interpolation within Photoshop
    Use the Photoshop Image Size box with the appropriate interpolation setting (Bicubic Smoother) to increase the image size up to the maximum size of your ink jet printer.
    What is the absolute minimum resolution that is acceptable when printing up to 44”?
    What about the idea of increasing your print size in 10% increments? Does this make a real difference?
    Level three - Resizing with vector-based applications like Genuine Fractals?
    In your experience do these work as advertized and do you recommend them for preparing files to print larger than the Epson 9900?
    Level four – Giant Digital Printing Methods
    What are the options for creating extremely large digital prints?
    Are there web sites or other resources you can point me to to learn more about this?
    How do you prepare files for very large-scale digital output?

    While what you say may be true, it is not always the case. I would view a 'painting' as more than a 'poster' in terms of output resolution, at least in the first stages of development. Definately get the info from your printer and then plan to use your hardware/software setup to give you the most creative flexibility. In other words - work as big as you can (within reason, see previous statement) to give yourself the most creative freedom. Things like subtle gradations and fine details will benefit from more pixels, and can with the right printer be transferred to hard copy at higher resolutions (a photo quality ink jet will take advantage of 600ppi) if that's what you're going for.
    Additionally it's much easier to down scale than to wish you had a bigger image after a 100 hours of labor...

  • IMAQ Array to Image Bit Shift?

    Hi,
    I've been working with some 12 bit images from a camera and saving the results as 16 bit TIFFs using some of the Vision VIs.  I can save and read back in the TIFFs and all of the data stays intact, but if I try to open the saved TIFFs in another reader (e.g. MATLAB), the returned data is incorrect.  Opening the raw TIFF files and looking at the image data (little endian) in bytes, numbers like 234 001 [490] end up becoming 234 129 [33258].  From the attached VI, it becomes clear there's a problem when you simply put in zeros to the array and try to open up the resultant TIFF in MATLAB (0 goes to 2^15) and yet LabView reads in the TIFF just fine.  While I can work around this problem, I only know I that need to work around it if I know a priori that the TIFF is from LabView.  Is there some resolution to this problem?  I'm thinking some kind of bit shifting to the data in LabView before converting the array to an image.  Thanks.
    Attachments:
    array_to_tiff.vi ‏49 KB

    Hello,
    Maybe you are looking for the functions "swap byte" and "swap words"
    Hope this helps
    Message Edité par TiTou le 06-29-2007 02:00 PM
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    swap.png ‏409 KB

Maybe you are looking for