gpt4 book ai didi

java - 从文件中的二进制内容中分离 ASCII 文本

转载 作者:行者123 更新时间:2023-12-01 14:08:50 24 4
gpt4 key购买 nike

我有一个包含 ASCII 文本和二进制内容的文件。我想提取文本而不必解析二进制内容,因为二进制内容是 180MB。我可以简单地提取文本以供进一步操作吗……最好的方法是什么。

ASCII 位于文件的最开头。

最佳答案

有 4 个库可以在 Java 中读取 FITS 文件 here :

Java

nom.tam.fits classes

A Java FITS library has been developed which provides efficient -- at least for Java -- I/O for FITS images and binary tables. The Java libraries support all basic FITS formats and gzip compressed files. Support for access to data subsets is included and the HIERARCH convention may be used.

eap.fits

Includes an applet and application for viewing and editing FITS files. Also includes a general purpose package for reading and writing FITS data. It can read PGP encrypted files if the optional PGP jar file is available.

jfits

The jfits library supports FITS images and ASCII and binary tables. In-line modification of keywords and data is supported.

STIL

A pure java general purpose table I/O library which can read and write FITS binary tables amongst other table formats. It is efficient and can provide fast sequential or random read access to FITS tables much larger than physical memory. There is no support for FITS images.

关于java - 从文件中的二进制内容中分离 ASCII 文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2249561/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com