Bits in a Carrier file
what would i need to do to write a program to display the bits in a carrier file.
Do you want to scrape off the LSBs (Least Significant Bits)? Have a look
at this for starters:public class LSBInputStream extends InputStream {
private InputStream carrier; // the carrier input
public LSBInputStream(InputStream carrier) { this.carrier= carrier; }
public void close() throws IOException { carrier.close(); }
public int read() throw IOException {
int bits= 0;
for (int i= 0; i < 8; i++) { // read 8 bytes
int byte= carrier.read();
if (byte == -1) return (i == 0)?-1:bits; // eof reached in the middle?
bits<<= 1; // roll in the next bit
bits|= byte&1;
return bits;
}This was from the top of my head, but I hope you get the picture
kind regards,
Jos
Similar Messages
-
How to count bit patterns in a file ?
Think of the following:
You have two files that you want to compare bit by bit.
A file has been send the other one has been received.
The two files can be of different size (Connection lost).
But you not only want to know how many bits are different you want also to know the run length of the different bits.
For example:
File 1: 1010101011101010111101011001
File 2: 1011101010001101010111010101
What is the result ?
Xor File1 and File2: 0001000001100111101010001100
Run Length 1: 3
Run Length 2: 2
Run Length 3: 0
Run Length 4: 1
I hope I didn't make a mistake.
Think also of using a blocksize for comparison.
Maybe you don't want to compare the files as a whole but want to know the number of errors for every block that is maybe 256 bit or 1024 bit. So read the files block by block, xor the blocks and count the bit errors by their run length.
So how can I get this result in LabView ?
Which data types do I have to take for comparison ? Which VIs do I have to use ?
Thanx for help and your timeHi Allen,
thanks for your posting.
I have now a working version.
For my as LabView newbee this was really hard work.
So how many bit patterns of "1" or "11" or "111" or "1111" are in the xor result of the two files ?
Or you can also ask: How long is the error (Burst error) ? And how often does it occur ?
Look for example for block error codes and this stuff.
Attached is the VI and two small text files (Both 10 Bytes).
I've tried a blocksize of 10 Bytes and also 5 Bytes.
The result is:
1 2 3 4
16 5 1 1
So there 16 errors of run length 1, 5 of run length 2 and so on.
Would be also nice to count special bit patterns like '1001101010111" or something like that.
But I think this is more easy.
Not the pattern is searched. The first 1 and the following 0 is searched.
The run length is used as index.
Attachments:
Filediff 4.vi 32 KB
Kopie1 von REAMDE.txt 1 KB
Kopie2 von REAMDE.txt 1 KB -
I have tried to download FireFox 4 and earlier versions from several different website, thinking the files might have gotten corrupted, and each time I download the file the exact same thing happens, the file downloads and the file gets extracted but when the extraction completes the small window dissappears and nothing else happens.
My machine is a Windows Vista 64 bit system and I've tried downloading the file with my 32 and 64 bit Internet Explorer but nothing seems to work. Can someone help me please because I would love to be able to completely delete I.E.Hi, thanks for your Flash file info. Well you must have been doing it right, since all of your Flash files for IE and FF are correct.
The SWF plugin for FF and the SWO for IE are also correct.
You shouldn't be having any problems with Flash Player.
What you can try is to turn off the hardware acceleration feature. Go to any video, like youtube and right click on the video and click on Settings. Display Settings is where you will UN check hardware acceleration.
See if that helps. Let me know.
Thanks,
eidnolb -
Windows 8.1 64-bit: PDF icons in File Explorer fail to show
On my Windows 8.1 Pro 64-bit it seems impossible for File Explorer to create thumbnails of my PDF files.
I use Adobe Acrobat X as my default PDF application.
I did some thorough research to find a solution. I expected a simple fix, but the problem persists hence this post.
There is only one work-around that works (from Adobe Community link below):
If you click Open in Acrobat
In the Explorer window select show large icons
Thumbnails will be created which will be visible in File Explorer.
My problem with the work-around is the extra work required to generate thumbnails. I have many PDF's whose front page thumbnail I use to select my file of choice.
What fix have I over-looked?
Cheers.
Dave---
I applied all these solutions:
Icon cache rebuildRemoved IconCache.db in %localappdata%
File Explorer > Options > View "Always show icons, never thumbnails"= off
Default application to open PDF Set to Adobe Acrobat in File Explorer
Default PDF handler set in Adobe Acrobat:
Click Edit > Preferences…
Click the button Select Default PDF handler
Click Apply. Acrobat will start an installer and processes the configuration changes.
Checked system with sfc /scannowNo problem detected
Removed thumbnails with Disk Clean-up
References:
http://www.pretentiousname.com/adobe_pdf_x64_fix/#downl
https://forums.adobe.com/thread/949406
http://www.sevenforums.com/tutorials/49819-icon-cache-rebuild.htmlFor many days I searched for answer of how an Internet Explorer add-on installed because few websites won't run without it, but Windows OS or Internet Explorer itself won't allow install of these add-ons.
Please note following problems:
1. Windows 8.1 64 bit operating system installs 32 bit Internet Explorer 11, but this 32 bit Internet Explorer won't accept 64 bit add-ons which I tried to install for 64 bit Windows 8.1, incompatibility of 64 bit and 32 bit which
I knew already but didn't clicked even on posting forum questions not before 'ORACLE's message in yellow.
2. For 64 bit Windows I kept on trying to install 64 bit add-ons for Internet Explorer, which won't install or would send message 'Incompatible', once default installations of these add-on's are disturbed but not completely uninstalled, new installations
won't be entertained at all, only way is reinstall of Internet Explorer.
3. Therefore I installed Apple's 'Safari', which also displayed same messages, but allowed install of 'Quick Time', and now I listen to my favourite songs on a great sound system of a website.
4. Windows needs correction for this.
Best of Luck.
Use the 32-bit version of IE. All rivals are 32-bit, no need for x64, a browser is not so big.
Corsair Carbide 300R with window
Corsair TX850V2 70A@12V
Asus M5A99FX PRO R2.0 CFX/SLI
AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
G.SKILL RipjawsX DDR3-2133 8 GB
EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
Asus PA238QR IPS LED HDMI DP 1080p
ST2000DM001 & Windows 8.1 Enterprise x64
Microsoft Wireless Desktop 2000
Wacom Bamboo CHT470M
Place your rig specifics into your signature like I have, makes it 100x easier to understand!
Hardcore Games Legendary is the Only Way to Play!
It's truly way bigger, handles much more memory, therefore should switch on x64 bit. -
Can't import a JPEG: "video bit depth of this file is unsupported"
Re above error message when attempting to import into a Premiere CS6 project. I used Media Info to inspect the file's properties as per below. All of the video in my project is 8bit video. Any help is much appreciated..
Image
Format : JPEG
Width : 1 306 pixels
Height : 979 pixels
Color space : YUV
Bit depth : 8 bits
Compression mode : Lossy
Stream size : 2.83 MiB (100%)Hi Jeff, thanks!!
I guess one cannot import cannot import a CMYK image in Premiere at all.
When I inspected the image in Media Info it ID'd it as a YUV and so I assumed that the imagwe was converted for use in a video that they'd created sometime in the past.
Is there even such a format as YUV for still images? Probably not even though Media Info ID'd it as such.
Anyway, Photoshop ID'd it as CMYK and when converted to RGB that did the trick!
Thanks! -
Trouble installing Photoshop CC 64 bit windows 8 - internal file signature incorrect
I had a problem and fixed it, and thought I'd post in case others have the problem. I have a new Win 8 machine. I subscribed to CC (LR+PS), but couldn't install PS 64 bit. Well, when I installed, I got a message it installed ok but had a problem. Adobe showed a log file I could access, but I couldn't access it, and I didn't want to look at a log file anyway. I was hoping for an answer in English. I tried to open PS 64 and got this message: "internal file signature is incorrect". I googled the message, and the majority opinion was to try and reinstall. Well, I had already tried that and failed. Then I got an idea I wish I had had before. When you get a new PC, first thing to do is update all the drivers, etc, and then go to Windows update. There were many Windows update. My PC is HP, so I went into it's support center, and clicked the button to update drivers, etc. There were a lot of updates, including the bios. After restarting the computer, the install of PS 64 worked, but then I got the other error I posted today (and fixed). Hope these posts help some poor souls.
Hi ArtfulToad,
Thank you for sharing the information.
Regards,
Romit Sinha -
Illustrator CS6 64-bit Crashes When Opening Files
This is a problem that has been plaguing me since I moved to CS6 64-bit (on a Windows 7 machine). I've only seen it in Illustrator:
Seemingly randomly once or twice a week, I will click on an AI file in Windows Explorer to open it, and Illustrator will crash to the desktop. There is no consistency to the files that I've been able to find. Some are local to my hard drive, and some are on the network. It could be a file I've opened several times the same day already or a file I haven't opened in months. I restart Illustrator and everything's fine— I can access the file, no problem.
The only trait that I have sussed out is that it seems to happen more frequently if I've left the computer idle for 20 minutes or so, which is well below the sleep time-out for my hard drive. It's almost like Illustrator doesn't know how to wait for a file if the file isn't immediately available. (The files are not open elsewhere.) I've read that Illustrator is cranky with files on network locations, but this happens more frequently with local files.
Program files are loaded from an SSD, but the scratch disk is my local HD and my files are stored on the HD. My scratch disk was originally the SSD, but the problem occured almost every day under that configuration. Moving the scratch disk to the HD made the crashes occur less frequently.
The event log for yesterday's crash doesn't seem to be particularly helpful. (Posted below.)
Is this behavior familiar to anyone? I have been searching Adobe's forums and the web in general with no luck for the last year. My apologies if this has been addressed elsewhere in the forums and I haven't found it.
Thanks in advance for any advice!
Log Name: Application
Source: Application Error
Date: 6/26/2013 2:38:35 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Description:
Faulting application name: Illustrator.exe, version: 16.0.3.691, time stamp: 0x50bb31df
Faulting module name: Illustrator.exe, version: 16.0.3.691, time stamp: 0x50bb31df
Exception code: 0xc0000005
Fault offset: 0x000000000066d8c8
Faulting process id: 0x1030
Faulting application start time: 0x01ce72527a68524e
Faulting application path: C:\Program Files\Adobe\Adobe Illustrator CS6 (64 Bit)\Support Files\Contents\Windows\Illustrator.exe
Faulting module path: C:\Program Files\Adobe\Adobe Illustrator CS6 (64 Bit)\Support Files\Contents\Windows\Illustrator.exe
Report Id: 9b76be3b-de8f-11e2-b99d-00259049948b
Event Xml:Thanks for the suggestion. I'll give that a shot... but wouldn't other applications be experiencing the same thing? I open Photoshop files all day and it's never happened. I'm in and out of CorelDraw as well. (I don't open Corel files in Illustrator.) I also see no disk errors in the event log, but, as I said, I'll check for updates because that couldn't hurt, right? :-)
Thanks again. -
64-bit, 32-bit Porting - Problem with file locking
Hi,
OS: Solaris 8
I am trying to port the existing 32-bit code to 64-bit. I am facing the following problem.
The executable works fine with 32-bit compilation, but fails with the 64-bit compilation. I am trying to lock a file, but it is failing with the errno = 9 [Bad file descriptor]
I have included the code. I would appreciate if some one can help me to solve this.
Many Thanks and Regards,
Srini
Please find below the compilation flags i used.
32-bit compilation:
cc -KPIC -Xa -mt -o coreflck coreflck.c
When i run the exe then the result is:
$coreflck
Done!!!!
64-bit compilation:
cc -KPIC -Xa -mt -xarch=v9 -o coreflck coreflck.c
When i run the exe then the result is:
$ coreflck
Error Occurred while locking errno:9
Done!!!!
Please find below the code (coreflck.c)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/errno.h>
#include <malloc.h>
extern int errno;
int lock(
int fd,
int cmd,
struct flock *lcks
int op = 0;
int sts;
do {
sts = fcntl (fd, cmd, lcks);
} while (sts == -1 && errno == EINTR);
return sts;
int main ()
struct flock lock_struct;
int mode, junk = 0;
FILE *fp;
fp = fopen("/krb5/tmp/cc/krb5cc_1024", "rb");
memset( &lock_struct, 0, sizeof( lock_struct ));
lock_struct.l_type = F_WRLCK;
lock_struct.l_whence = SEEK_SET;
do {
mode = fcntl (fileno( fp ), F_GETFL, junk);
} while (mode == -1 && errno == EINTR);
if (mode == -1 )
printf("Error Occurred errno:%d\n",errno);
else {
/* If the file's mode is read-only then we
try for a shared lock; Otherwise, we
try for an exclusive lock. */
if( mode == O_RDONLY )
lock_struct.l_type = F_RDLCK;
if( lock( fileno( fp ), F_SETLKW, &lock_struct ) == -1 )
printf("Error Occurred while locking errno:%d\n", errno);
printf("Done!!!!\r\n");I found the solution
I changed the line
if( mode == O_RDONLY )
to
if( (mode & O_ACCMODE) == O_RDONLY )
Since, if we use
F_GETFL
Get the file status flags and file access modes, defined in <fcntl.h>, for the file description associated with fildes. The file access modes can be extracted from the return value using the mask O_ACCMODE, which is defined in <fcntl.h>. File status flags and file access modes are associated with the file description and do not affect other file descriptors that refer to the same file with different open file descriptions.
Cheers,
Srini -
Windows 7 32 bit search of PDF files does not work
I have installed Windows 7 on a 32 bit Dell Laptop and I can no longer search the content of my PDF files using Microsoft's search in Windows Explorer which I need to do. I’ve tried following the advice listed on several sites on line and nothing seems to work. My 64bit processor required a download of Adobe PDF iFilter 9 for 64-bit platforms and those systems work fine. All the write-ups suggest that Reader XI for 32 bit Windows 7 has the filter built in and Microsoft indexing indicates it is there but I still can't search for words in a PDF like I could using Windows XP.
Any advice would be greatly appreciated! Thanks in advance for any help.I will never understand why but in the end I rebuilt my 32 bit dell laptop from scratch and the pdf files can now be searched.
I cannot search them on a mapped drive as I was able to with Windows XP because now they must be indexed and windows 7 will seems not to allow a mapped location to be indexed which must be done to make the pdf files searchable so I have had to move the files to the local drive.
My Windows 7 64 bit systems can search the mapped drives just fine without needing to be indexed. Again I will never understand why this works and the 32 bit machine does not. -
Photoshop CS5 - win 7 - 8.1 64 bit - Lag to open files from lan
Hello,
we have got a problem with photoshop. If we open a file from lan, photoshop wait some seconds before open it, even with very little pics. It has a lag of some seconds before start to open it. With local files is the same.
If I erase the recent files list and then I try to open a local file, it opens immediately. If I open a lan file and then I open a local file, the problem returns.
It looks like a recent file list problem. I tried to set it to 0 but nothing changes, because it save the recent list anyway but simply it doesn't show it.
I tried to disable the suitcase extensis plug-in (the only plug-in we have added), I tried to disable kaspersky antivirus, but nothing.
We have this problem with all 3 workstations, 2 with win 7 64bit and one with win 8.1 64 bit. With the older station the lag is bigger (5-10 seconds for every image). With the newest station 1 sec.
Is there any solution?
Is there anything to do for stop the recent file list to work?
Thanks a lot
NicolaAre they on the same router are there different OS, adapter speeds file system involved. On my home network where my windows machine are connected to the same router with 1GHz ethernet a 20MB CR2 file takes only a second or two open in ACR.
-
Bit comparison on binary files
Hi
I am trying to compare two binary files in order to find out how many bits differ between the two files. I dont know how to reference file 'bits' in order to perform the comparison however, and i cannot find much information online. Can anybody give me some pointers on how to start or point me towards some helpful information?
ThanksRead the files in bytes.
XOR the corresponding bytes. Only bits that differ will be 1.
AND with 0x01 to see if the low order bit is 1. Shift right and repeat for the rest of the bits. -
3.0 EA3 for 64-bit Windows - corrupt zip file
Hi
I have tried to download EA3 for 64-bit Windows several times now. Each time, bot 7-zip and Windows' built-in ZIP support tells me, that the ZIP file is invalid. Please fix this.
Thanks in advance,
JacobIt seems, that Firefox 4 beta 9 has some file download issues. I switched to Chrome to download the file, and here it succeeded in downloading a valid zip file. Oh well... better get this reported to Mozilla.
Thanks for checking this for me. -
Why only 10-bit depth dng files from 16-bit Nikon D90 nef files?
When I convert 16-bit .nef files from my Nikon D90 to DNG I get only 10-bits depth.
Since the camera should be producing 12-bit depth it seems I am losing information in the conversion, and I don't want that.
I have installed the 7.1 DNG converter, and I suppose that is what is used when I download from camera memory card through Bridge 5.1 and click dng conversion.
Same thing if I open the .nef in Photoshop 5.1 , which kicks up CameraRaw converter 6.7.0.339.
Why is this?
Can't .dng have more than 10-bit depth?
SverkWell, according to the user manual and to the review in
http://www.imaging-resource.com/PRODS/D90/D90A.HTM
the D90 delivers 12-bit color depth in the .NEF files.
Of course, I haven't looked at the actual pixel data to find out how finely graded they are.
What I'm looking at is what Bridge 5.1 (WindowsXP) says about the files in the
Metadata/ Bit depth entry.
In that, the .NEF files are listed as "16-bit" depth (although it will actually hold only 12-bit resolution), but when converted to .DNG it says only "10-bit",
and that holds both when the conversion is done automatically during the importing from the camera, and when converting from .nef files afterwards.
Archiving pictures in the .dng format seems to be a good idea -- but only if no information is lost in the conversion.
Thus, the "10-bit" info showing in Bridge worries me.
Might it be that the meaning of bit depth is different in the two file formats?
Might there be something about the de-mosaicing that necessarily consumes two bits of depth? Whether in the .dng conversion -- or when saved .nef files are later to be used?
In other words, for practical purposes, are the formats equivalent in color resolution,
Or is there indeed a certain loss?
Maybe a very difficult question, but I'd sure want to have a technical ly definite answer before I dare switch to using the .DNG format all the way.
Sverk -
Audio bit rate (kbps) and file size balance
I'm new to Flash, and I'm trying to decide how to set the bit
rate (kbps) for my audio files.
I'm creating PowperPoint-like presentations with voice audio.
You can see what I'm doing at
http://preparatorychemistry.com/Bishop_Audio_Book.htm
I first decided on 16 kbps, but I'm not happy with how it
sounds, especially through headphones connected to the computer. My
presentations, of course, sound better with higher bit rates, but
file sizes roughly double for each doubling of the bit rate. At 16
kbps, my files range from 1-3 MB, so for 32 kbps (which I'm leaning
toward now), they are 2-6 MB. My questions are
What's the concensus on the best bit rate for Internet sound
files, especially voice?
How important is it to minimize files size? The files are
already large enough so that dial-up folks will probably not listen
to them, and even the larger files seem to download fast enough
with my cable connection.
Thanks for the help.
MarkChemistry guy wrote:
> I'm new to Flash, and I'm trying to decide how to set
the bit rate (kbps) for
> my audio files.
>
> I'm creating PowperPoint-like presentations with voice
audio. You can see what
> I'm doing at
>
>
http://preparatorychemistry.com/Bishop_Audio_Book.htm
>
> I first decided on 16 kbps, but I'm not happy with how
it sounds, especially
> through headphones connected to the computer. My
presentations, of course,
> sound better with higher bit rates, but file sizes
roughly double for each
> doubling of the bit rate. At 16 kbps, my files range
from 1-3 MB, so for 32
> kbps (which I'm leaning toward now), they are 2-6 MB. My
questions are
>
> What's the concensus on the best bit rate for Internet
sound files, especially
> voice?
The best is the import high quality sound in wav format. Than
in library you can
play around with m3p compression changing the rates and all.
Checking the quality
versus the file size and find one that suit your needs. There
is no BEST format to
import. Every single fill have individual setting. It's all
depends on the sound.
Like, in case of voice. Very different to other sounds.
Save it as ADPCM (adaptive pulse code modulation) or Mp3
9kbps as your second choice.
Also take note that STREAM always lower down the quality , it
suppose to load fast so flash reduce
it enormously , usually sound like pure crap, go to library
(CTRL L to open) right click your sound
and go to properties, adjust the compression and type of
audio format to find best size and quality...
> How important is it to minimize files size? The files
are already large enough
> so that dial-up folks will probably not listen to them,
and even the larger
> files seem to download fast enough with my cable
connection.
You would be surprised. I was doing voice overs two or 3
weeks ago for a client.
Needed 5 sounds , up to two minutes each, for different
slides. Ranging from 2.5 MB
to 2.9 MB per file.
After compressing all of them, I had 5 sounds in very good
quality of total size 1.4 MB
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Establishing Proper hz and bit rate for AIFF files
Hello Hello
I was under the impression that AIFF sound files need to be imported into FCE with specs of:
16 Bit, 48K
Yes?
Or if not, any harm done? - since I just bought a bunch of royalty-free sound AIFF files at 48K?
(Hope I don't need to convert them)
(Hope this doesn't stress out the audio encoding process)
Thanx my friends
MikeOn the off chance you ment to say that the material you purchased is 44.1khz, you can convert them easily using QT Pro, iTunes or an audio program such as Peak or Soundtrack Pro before you bring them into Final Cut.
Final Cut does not do a very good job of converting sample rates on the fly and you can end up with issues such as audio sync drift, unexplained pops and clicks or other anomalies.
good luck.
x
Maybe you are looking for
-
Servlet session objects shariing same session objects? Help!
Hi all, Is it possible for two different HttpSessions to share the same session objects. We have a java class that we store in the session. This class calls a stateless Session EJB to do quoting for an insurance policy. It seems t
-
Software Version 7.36 in Nokia asha 311
how long it takes to get the version 7.36 in america latin spanish version? some alternative?
-
My phone says disabled connect to iTunes but I have no PC to do it is there any other way?
HElp please???
-
Java desktop problem after patch 118870-01 install
FYI Java desktop stopped functioning properly after the installation of patch 118870-01, part of the recommended patch cluster. Symptoms included no longer being able to launch mozilla, and upon reboot, no longer being able to login to java desktop.
-
Hello, I have noticed that when I'm distributing large files (Operating System Images) to our on-site distribution points, the file transfers have been taking a substantial amount of time. Using resource monitor and task manager, the transfer is happ