ECS36B computer

Part 1: split a large file into fixed-size pieces and re-join them

As common file/database size is getting much larger these days, it is handy to be able to break them into small pieces for the purpose of storage or internet transfer, and then to heal them back together to the original form whenever needed. For this homework assignment, we will build such tools (also to apply what you might have learned from ecs36a) --

(Programs) myHeal and myBreak are two utility programs for separating a giant file into smaller-sized chunks and re-assembling the chunks back to their original.

myBreak: the myBreak program will separate the source file, typically very large file size, into fixed-size chunks (for example, 1 MB a piece). You have the freedom to design how you like to separate them (of course, your own myHeal program will put them back correctly), but the program must take the following arguments:

usage: ./myBreak <source> <prefix> <chunk size (K)>

Here is an example è

(base) MBP:myBreakHeal sfwu$ ls -l toID_sorted_Lall_LIS.xls

-rw-r--r--  1 sfwu  staff  710779752 Sep 30 12:15 toID_sorted_Lall_LIS.xls

(base) MBP:myBreakHeal sfwu$ ./myBreak toID_sorted_Lall_LIS.xls myPrefix 65536

 starting myPrefix.00000000000000000000000000000000

 starting myPrefix.00000000000000000000000000000001

 starting myPrefix.00000000000000000000000000000002

 starting myPrefix.00000000000000000000000000000003

 starting myPrefix.00000000000000000000000000000004

 starting myPrefix.00000000000000000000000000000005

 starting myPrefix.00000000000000000000000000000006

 starting myPrefix.00000000000000000000000000000007

 starting myPrefix.00000000000000000000000000000008

 starting myPrefix.00000000000000000000000000000009

 starting myPrefix.00000000000000000000000000000010

done... [11] chunks produced for toID_sorted_Lall_LIS.xls

While you can design and implement your own version of myBreak program, the source code of a reference implementation of myBreak.c will be provided.

myHeal: the myHeal program will re-generate the original file broken by the myBreak program. For error handling, the program needs to detect if any chunk is missing and also the chunk size of incorrect.

Here is the example è

相关推荐

  1. ECS36B computer

    2024-01-02 12:40:01       46 阅读
  2. actual combat 35 —— es

    2024-01-02 12:40:01       27 阅读
  3. AWS ECSEC2、EKS 和 Fargate 之间的关系

    2024-01-02 12:40:01       74 阅读
  4. 【记录31】elementUI el-tree 虚线、右键、拖拽

    2024-01-02 12:40:01       43 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-02 12:40:01       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-02 12:40:01       106 阅读
  3. 在Django里面运行非项目文件

    2024-01-02 12:40:01       87 阅读
  4. Python语言-面向对象

    2024-01-02 12:40:01       96 阅读

热门阅读

  1. 小肥柴的Hadoop之旅

    2024-01-02 12:40:01       60 阅读
  2. 我的运维认知

    2024-01-02 12:40:01       61 阅读
  3. ASIC与FPGA哪个前景好?FPGA有必要转ASIC吗?

    2024-01-02 12:40:01       68 阅读
  4. Vue中的keep-alive缓存组件的理解

    2024-01-02 12:40:01       52 阅读
  5. 12.26

    12.26

    2024-01-02 12:40:01      64 阅读
  6. c++ day4

    2024-01-02 12:40:01       44 阅读
  7. 微信小程序canvas手写签字

    2024-01-02 12:40:01       52 阅读